[llvm] [clang] [clang-tools-extra] [InstCombine] Convert or concat to fshl if opposite or concat exists (PR #68502)

2023-11-12 Thread Nikita Popov via cfe-commits
nikic wrote: Yes, I understand that this transform is only a step towards handling the full pattern. I'm asking for a complete, working example of the original motivating case. The snippets posted in https://github.com/llvm/llvm-project/pull/68502#discussion_r1351618002 do not appear to be co

[clang] 40671bb - [clang-format] Handle control statements in BreakAfterAttributes (#71995)

2023-11-12 Thread via cfe-commits
Author: Owen Pan Date: 2023-11-12T01:08:27-08:00 New Revision: 40671bbdefb6ff83e2685576a3cb041b62f25bbe URL: https://github.com/llvm/llvm-project/commit/40671bbdefb6ff83e2685576a3cb041b62f25bbe DIFF: https://github.com/llvm/llvm-project/commit/40671bbdefb6ff83e2685576a3cb041b62f25bbe.diff LOG:

[clang] [clang-format] Handle control statements in BreakAfterAttributes (PR #71995)

2023-11-12 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/71995 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Add LTO support for Haiku and OpenBSD (PR #72047)

2023-11-12 Thread Brad Smith via cfe-commits
https://github.com/brad0 created https://github.com/llvm/llvm-project/pull/72047 None >From 9f374ff55cb851534a8c882770d9237f1d40a8b8 Mon Sep 17 00:00:00 2001 From: Brad Smith Date: Sat, 21 Oct 2023 02:18:34 -0400 Subject: [PATCH] [Driver] Add LTO support for Haiku and OpenBSD --- clang/lib/Dr

[clang] [Driver] Add LTO support for Haiku and OpenBSD (PR #72047)

2023-11-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Brad Smith (brad0) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/72047.diff 7 Files Affected: - (modified) clang/lib/Driver/ToolChains/CommonArgs.cpp (+2-1) - (modified) clang/lib/Driver/ToolChains/Haiku.cpp (+14)

[clang-tools-extra] [clang-tidy] Fixes to readability-implicit-bool-conversion (PR #72050)

2023-11-12 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL created https://github.com/llvm/llvm-project/pull/72050 - Fixed issue with invalid code being generated when static_cast is put into fix, and no space were added before it. - Fixed issue with duplicate parentheses being added when double implicit cast is used. Clos

[clang-tools-extra] [clang-tidy] Fixes to readability-implicit-bool-conversion (PR #72050)

2023-11-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Piotr Zegar (PiotrZSL) Changes - Fixed issue with invalid code being generated when static_cast is put into fix, and no space were added before it. - Fixed issue with duplicate parentheses being added when double implicit cast is use

[clang-tools-extra] [llvm] [clang] [InstCombine] Convert or concat to fshl if opposite or concat exists (PR #68502)

2023-11-12 Thread via cfe-commits
HaohaiWen wrote: > Yes, I understand that this transform is only a step towards handling the > full pattern. I'm asking for a complete, working example of the original > motivating case. The snippets posted in [#68502 > (comment)](https://github.com/llvm/llvm-project/pull/68502#discussion_r135

[clang-tools-extra] [llvm] [clang] [InstCombine] Convert or concat to fshl if opposite or concat exists (PR #68502)

2023-11-12 Thread via cfe-commits
@@ -2727,105 +2727,161 @@ Instruction *InstCombinerImpl::matchBSwapOrBitReverse(Instruction &I, } /// Match UB-safe variants of the funnel shift intrinsic. -static Instruction *matchFunnelShift(Instruction &Or, InstCombinerImpl &IC) { +static Instruction *matchFunnelShift(Ins

[clang] [X86][AVX10] Permit AVX512 options/features used together with AVX10 (PR #71318)

2023-11-12 Thread via cfe-commits
ronlieb wrote: > @ronlieb Do you have a reproducer for this problem? I just checked the > definition of both intrinsics have `no-evex512` already, so shouldn't have > such problem. You can use -mno-evex512 as workaround for the problem anyway. here is a small reproducer , compile with clang

[clang] 8569465 - Add a Clang NATVIS visualizer for StringLiteral

2023-11-12 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2023-11-12T09:22:15-05:00 New Revision: 8569465adf5e6c792e88be56b0e6b24f1c74e633 URL: https://github.com/llvm/llvm-project/commit/8569465adf5e6c792e88be56b0e6b24f1c74e633 DIFF: https://github.com/llvm/llvm-project/commit/8569465adf5e6c792e88be56b0e6b24f1c74e633.diff

[llvm] [clang] [InstCombine] Use zext's nneg flag for icmp folding (PR #70845)

2023-11-12 Thread Léonard Oest O'Leary via cfe-commits
leo-ard wrote: > Do you have the access to merge PR? No I don't. Thanks for the time and insightful comments ! https://github.com/llvm/llvm-project/pull/70845 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/ma

[llvm] [clang-tools-extra] [clang] [InstCombine] Convert or concat to fshl if opposite or concat exists (PR #68502)

2023-11-12 Thread Nikita Popov via cfe-commits
nikic wrote: Thanks for the updated example! To explain what I meant in first comment using this example: We would perform the transform https://alive2.llvm.org/ce/z/nllcB_, which does not depend at all on how `%yx` is constructed, and whether there is any way to form the `fshl` separately. I

[llvm] [clang] [InstCombine] Use zext's nneg flag for icmp folding (PR #70845)

2023-11-12 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw closed https://github.com/llvm/llvm-project/pull/70845 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] f575d79 - [clangd] Use InitLLVM (#69119)

2023-11-12 Thread via cfe-commits
Author: Aleksandr Platonov Date: 2023-11-12T20:46:47+03:00 New Revision: f575d792c6467234076f860fe7eecced620d3aae URL: https://github.com/llvm/llvm-project/commit/f575d792c6467234076f860fe7eecced620d3aae DIFF: https://github.com/llvm/llvm-project/commit/f575d792c6467234076f860fe7eecced620d3aae.

[clang-tools-extra] [clangd] Use InitLLVM (PR #69119)

2023-11-12 Thread Aleksandr Platonov via cfe-commits
https://github.com/ArcsinX closed https://github.com/llvm/llvm-project/pull/69119 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang] [llvm] [InstCombine] Convert or concat to fshl if opposite or concat exists (PR #68502)

2023-11-12 Thread Yingwei Zheng via cfe-commits
@@ -2840,6 +2841,46 @@ static Instruction *matchFunnelShift(Instruction &Or, InstCombinerImpl &IC) { return nullptr; FShiftArgs = {ShVal0, ShVal1, ShAmt}; + } else if (isa(Or0) || isa(Or1)) { +// If there are two 'or' instructions concat variables in opposite o

[clang] [clang-format] Option to ignore PP directives (PR #70338)

2023-11-12 Thread Björn Schäpers via cfe-commits
@@ -24153,6 +24153,23 @@ TEST_F(FormatTest, WhitespaceSensitiveMacros) { verifyNoChange("FOO(String-ized&Messy+But: :Still=Intentional);", Style); } +TEST_F(FormatTest, IgnorePPDefinitions) { HazardyKnusperkeks wrote: Can you also add some nested `#if` and

[clang] [clang-format] Option to ignore PP directives (PR #70338)

2023-11-12 Thread Björn Schäpers via cfe-commits
@@ -24153,6 +24153,53 @@ TEST_F(FormatTest, WhitespaceSensitiveMacros) { verifyNoChange("FOO(String-ized&Messy+But: :Still=Intentional);", Style); } +TEST_F(FormatTest, IgnorePPDefinitions) { + FormatStyle Style = getLLVMStyle(); + Style.IgnorePPDefinitions = true; + + ve

[clang] [clang-format] Option to ignore PP directives (PR #70338)

2023-11-12 Thread Björn Schäpers via cfe-commits
@@ -1134,6 +1134,14 @@ void UnwrappedLineParser::parsePPDefine() { return; } + if (Style.IgnorePPDefinitions) { +do { + nextToken(); +} while (!eof()); HazardyKnusperkeks wrote: I assume you have tested this on real code. Can you explain w

[clang] [clang-format] Option to ignore PP directives (PR #70338)

2023-11-12 Thread Björn Schäpers via cfe-commits
@@ -24153,6 +24153,53 @@ TEST_F(FormatTest, WhitespaceSensitiveMacros) { verifyNoChange("FOO(String-ized&Messy+But: :Still=Intentional);", Style); } +TEST_F(FormatTest, IgnorePPDefinitions) { + FormatStyle Style = getLLVMStyle(); + Style.IgnorePPDefinitions = true; + + ve

[clang] [clang-format] Option to ignore PP directives (PR #70338)

2023-11-12 Thread Björn Schäpers via cfe-commits
@@ -4719,6 +4723,7 @@ struct FormatStyle { R.IncludeStyle.IncludeIsMainRegex && IncludeStyle.IncludeIsMainSourceRegex == R.IncludeStyle.IncludeIsMainSourceRegex && + IgnorePPDefinitions == R.IgnorePPDefinitions && -

[clang] [clang-format] Option to ignore PP directives (PR #70338)

2023-11-12 Thread Björn Schäpers via cfe-commits
@@ -1355,6 +1355,8 @@ unsigned UnwrappedLineFormatter::format( bool FixIndentation = (FixBadIndentation || ContinueFormatting) && Indent != TheLine.First->OriginalColumn; bool ShouldFormat = TheLine.Affected || FixIndentation; +if (Style.Ig

[clang] [clang-format] Option to ignore PP directives (PR #70338)

2023-11-12 Thread Björn Schäpers via cfe-commits
@@ -4648,6 +4648,10 @@ struct FormatStyle { /// \version 11 std::vector WhitespaceSensitiveMacros; + /// Ignore formatting in preprocessor definitions. HazardyKnusperkeks wrote: Run `clang/docs/tools/dump_format_style.py`. https://github.com/llvm/llvm-p

[clang] [clang-format] Option to ignore PP directives (PR #70338)

2023-11-12 Thread Björn Schäpers via cfe-commits
@@ -24153,6 +24153,53 @@ TEST_F(FormatTest, WhitespaceSensitiveMacros) { verifyNoChange("FOO(String-ized&Messy+But: :Still=Intentional);", Style); } +TEST_F(FormatTest, IgnorePPDefinitions) { + FormatStyle Style = getLLVMStyle(); + Style.IgnorePPDefinitions = true; + + ve

[clang] [clang-format] Option to ignore PP directives (PR #70338)

2023-11-12 Thread Björn Schäpers via cfe-commits
@@ -24153,6 +24153,53 @@ TEST_F(FormatTest, WhitespaceSensitiveMacros) { verifyNoChange("FOO(String-ized&Messy+But: :Still=Intentional);", Style); } +TEST_F(FormatTest, IgnorePPDefinitions) { + FormatStyle Style = getLLVMStyle(); + Style.IgnorePPDefinitions = true; + + ve

[clang] [clang-format] Option to ignore PP directives (PR #70338)

2023-11-12 Thread Björn Schäpers via cfe-commits
@@ -24153,6 +24153,23 @@ TEST_F(FormatTest, WhitespaceSensitiveMacros) { verifyNoChange("FOO(String-ized&Messy+But: :Still=Intentional);", Style); } +TEST_F(FormatTest, IgnorePPDefinitions) { + FormatStyle Style = getLLVMStyle(); + Style.IgnorePPDefinitions = true; + + ve

[clang] [clang-format] Option to ignore PP directives (PR #70338)

2023-11-12 Thread Björn Schäpers via cfe-commits
@@ -24153,6 +24153,23 @@ TEST_F(FormatTest, WhitespaceSensitiveMacros) { verifyNoChange("FOO(String-ized&Messy+But: :Still=Intentional);", Style); } +TEST_F(FormatTest, IgnorePPDefinitions) { + FormatStyle Style = getLLVMStyle(); + Style.IgnorePPDefinitions = true; + + ve

[clang] [clang-format][NFC] Simplify parseBracedList() (PR #72010)

2023-11-12 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks approved this pull request. https://github.com/llvm/llvm-project/pull/72010 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Improved readability-bool-conversion to be more consistent when using parentheses (PR #72068)

2023-11-12 Thread Félix-Antoine Constantin via cfe-commits
https://github.com/felix642 created https://github.com/llvm/llvm-project/pull/72068 Fixes #71852 From 54743ceec9845cdc450d5c163a293e73884a8df9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix-Antoine=20Constantin?= Date: Sun, 12 Nov 2023 16:07:13 -0500 Subject: [PATCH] [clang-tidy] Improve

[clang-tools-extra] [clang-tidy] Improved readability-bool-conversion to be more consistent when using parentheses (PR #72068)

2023-11-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Félix-Antoine Constantin (felix642) Changes Fixes #71852 --- Full diff: https://github.com/llvm/llvm-project/pull/72068.diff 3 Files Affected: - (modified) clang-tools-extra/clang-tidy/readability/ImplicitBoolConversionCheck.cpp (

[clang-tools-extra] [clang-tidy] Improved readability-bool-conversion to be more consistent when using parentheses (PR #72068)

2023-11-12 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff 4c3206c5d5dee9dc3c7ad32c09d57a7fc592bcea 54743ceec9845cdc450d5c163a293e73884a8df9 --

[clang-tools-extra] [clang-tidy] Improved readability-bool-conversion to be more consistent when using parentheses (PR #72068)

2023-11-12 Thread Félix-Antoine Constantin via cfe-commits
https://github.com/felix642 updated https://github.com/llvm/llvm-project/pull/72068 From 649c7b8b936d848100b58e733dd358fa1d5914fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix-Antoine=20Constantin?= Date: Sun, 12 Nov 2023 16:07:13 -0500 Subject: [PATCH] [clang-tidy] Improved readability-

[clang-tools-extra] [clang-tidy] Improved readability-bool-conversion to be more consistent when using parentheses (PR #72068)

2023-11-12 Thread Oliver Stöneberg via cfe-commits
firewave wrote: Another PR for this was opened a few hours ago: #71848. https://github.com/llvm/llvm-project/pull/72068 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Improved readability-bool-conversion to be more consistent when using parentheses (PR #72068)

2023-11-12 Thread Félix-Antoine Constantin via cfe-commits
felix642 wrote: Hi @firewave, I think you are referencing a different issue. If I test #71852 with PR #72050 I do not get the expected behavior. https://github.com/llvm/llvm-project/pull/72068 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

[clang] [clang][driver] Add \/../include/c++/v1 to include path on Darwin (PR #70817)

2023-11-12 Thread Liviu Ionescu via cfe-commits
https://github.com/ilg-ul updated https://github.com/llvm/llvm-project/pull/70817 >From 7fbc229ee7316d826517480ee7896c91dad941f3 Mon Sep 17 00:00:00 2001 From: Liviu Ionescu Date: Tue, 31 Oct 2023 17:09:04 +0200 Subject: [PATCH 1/5] Add \/../include/c++/v1 to include path On macOS, when clang

[clang-tools-extra] [clang-tidy] Improved readability-bool-conversion to be more consistent when using parentheses (PR #72068)

2023-11-12 Thread Oliver Stöneberg via cfe-commits
firewave wrote: > Hi @firewave, I think you are referencing a different issue. If I test #71852 > with PR #72050 I do not get the expected behavior. Of course you are right. I missed there being two different issues. Sorry about the noise. https://github.com/llvm/llvm-project/pull/72068 _

[clang] [clang-tools-extra] [clang-tidy] fix match for binaryOperator in ExprMutationAnalyzer for misc-const-correctness (PR #70559)

2023-11-12 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti updated https://github.com/llvm/llvm-project/pull/70559 >From b29eb35fe8597ceefc4c615817174181a16f3c4c Mon Sep 17 00:00:00 2001 From: Julian Schmidt <44101708+5chmi...@users.noreply.github.com> Date: Sat, 28 Oct 2023 18:08:51 +0200 Subject: [PATCH 1/4] [clang-tidy] fi

[clang] [clang][ASTMatcher] Add matchers for CXXFoldExpr (PR #71245)

2023-11-12 Thread Julian Schmidt via cfe-commits
5chmidti wrote: Could someone please reapply the `clang` label to trigger the pr subscriber action? https://github.com/llvm/llvm-project/pull/71245 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo

[clang] [clang][driver] Add \/../include/c++/v1 to include path on Darwin (PR #70817)

2023-11-12 Thread Liviu Ionescu via cfe-commits
https://github.com/ilg-ul updated https://github.com/llvm/llvm-project/pull/70817 >From 7fbc229ee7316d826517480ee7896c91dad941f3 Mon Sep 17 00:00:00 2001 From: Liviu Ionescu Date: Tue, 31 Oct 2023 17:09:04 +0200 Subject: [PATCH 1/6] Add \/../include/c++/v1 to include path On macOS, when clang

[clang-tools-extra] [clang] [clang-tidy] fix match for binaryOperator in ExprMutationAnalyzer for misc-const-correctness (PR #70559)

2023-11-12 Thread Julian Schmidt via cfe-commits
5chmidti wrote: > In tests we usually use `-fno-delayed-template-parsing` to overcome this > issue with templates and windows. Done. I changed the test in `ExprMutationAnalyzerTest.cpp` to use the flag, `const-correctness-templates.cpp` already had it, and I changed the tested code back to wh

[libunwind] [libunwind] Remove unnecessary strcpy dependency (PR #72043)

2023-11-12 Thread Michael Kenzel via cfe-commits
michael-kenzel wrote: > I would assume this is already transformed to memcpy but I guess it won't be > for -O0 [I did some testing on this](https://godbolt.org/z/YMEjbxYd9): it seems that gcc replaces the `strcpy` with a simple `mov` even under `-O0`, but not the `memcpy`. clang does the reve

[clang] [clang][driver] Add \/../include/c++/v1 to include path on Darwin (PR #70817)

2023-11-12 Thread Liviu Ionescu via cfe-commits
https://github.com/ilg-ul updated https://github.com/llvm/llvm-project/pull/70817 >From 7fbc229ee7316d826517480ee7896c91dad941f3 Mon Sep 17 00:00:00 2001 From: Liviu Ionescu Date: Tue, 31 Oct 2023 17:09:04 +0200 Subject: [PATCH 1/7] Add \/../include/c++/v1 to include path On macOS, when clang

[clang-tools-extra] [clang-tidy] Improved readability-bool-conversion to be more consistent when using parentheses (PR #72068)

2023-11-12 Thread Piotr Zegar via cfe-commits
@@ -412,6 +412,10 @@ Changes in existing checks do-while loops into account for the `AllowIntegerConditions` and `AllowPointerConditions` options. +- Improved :doc:`readability-implicit-bool-conversion PiotrZSL wrote: merge release notes, one entry for a

[clang-tools-extra] [clang-tidy] Improved readability-bool-conversion to be more consistent when using parentheses (PR #72068)

2023-11-12 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. Description for a change (commit / PR) needed. Except that looks fine. https://github.com/llvm/llvm-project/pull/72068 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.or

[clang] [clang-tools-extra] [clang-tidy] fix match for binaryOperator in ExprMutationAnalyzer for misc-const-correctness (PR #70559)

2023-11-12 Thread Piotr Zegar via cfe-commits
@@ -308,6 +308,11 @@ Changes in existing checks ` check to avoid false positive when using pointer to member function. +- Improved :doc:`misc-const-correctness PiotrZSL wrote: there is already entry for this check, just merge changes. https://github.com

[clang] [clang-tools-extra] [clang-tidy] fix match for binaryOperator in ExprMutationAnalyzer for misc-const-correctness (PR #70559)

2023-11-12 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. https://github.com/llvm/llvm-project/pull/70559 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][driver] Add \/../include/c++/v1 to include path on Darwin (PR #70817)

2023-11-12 Thread Liviu Ionescu via cfe-commits
https://github.com/ilg-ul updated https://github.com/llvm/llvm-project/pull/70817 >From 7fbc229ee7316d826517480ee7896c91dad941f3 Mon Sep 17 00:00:00 2001 From: Liviu Ionescu Date: Tue, 31 Oct 2023 17:09:04 +0200 Subject: [PATCH 1/8] Add \/../include/c++/v1 to include path On macOS, when clang

[libunwind] [libunwind] Remove unnecessary strcpy dependency (PR #72043)

2023-11-12 Thread Michael Kenzel via cfe-commits
https://github.com/michael-kenzel edited https://github.com/llvm/llvm-project/pull/72043 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [libunwind] Remove unnecessary strcpy dependency (PR #72043)

2023-11-12 Thread Michael Kenzel via cfe-commits
@@ -143,7 +143,7 @@ _Unwind_Backtrace(_Unwind_Trace_Fn callback, void *ref) { // Create a mock exception object for force unwinding. _Unwind_Exception ex; memset(&ex, '\0', sizeof(ex)); - strcpy((char *)&ex.exception_class, "CLNGUNW"); + memcpy(&ex.exception_class, "CLN

[libunwind] [libunwind] Remove unnecessary strcpy dependency (PR #72043)

2023-11-12 Thread Michael Kenzel via cfe-commits
https://github.com/michael-kenzel edited https://github.com/llvm/llvm-project/pull/72043 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [libunwind] Remove unnecessary strcpy dependency (PR #72043)

2023-11-12 Thread Michael Kenzel via cfe-commits
https://github.com/michael-kenzel edited https://github.com/llvm/llvm-project/pull/72043 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang-tidy] fix match for binaryOperator in ExprMutationAnalyzer for misc-const-correctness (PR #70559)

2023-11-12 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti updated https://github.com/llvm/llvm-project/pull/70559 >From b29eb35fe8597ceefc4c615817174181a16f3c4c Mon Sep 17 00:00:00 2001 From: Julian Schmidt <44101708+5chmi...@users.noreply.github.com> Date: Sat, 28 Oct 2023 18:08:51 +0200 Subject: [PATCH 1/5] [clang-tidy] fi

[libunwind] [libunwind] Remove unnecessary strcpy dependency (PR #72043)

2023-11-12 Thread Michael Kenzel via cfe-commits
https://github.com/michael-kenzel edited https://github.com/llvm/llvm-project/pull/72043 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang-tidy] fix match for binaryOperator in ExprMutationAnalyzer for misc-const-correctness (PR #70559)

2023-11-12 Thread Julian Schmidt via cfe-commits
@@ -308,6 +308,11 @@ Changes in existing checks ` check to avoid false positive when using pointer to member function. +- Improved :doc:`misc-const-correctness 5chmidti wrote: Done. I have also reworded the release note, I think it reads better now. htt

[libunwind] [libunwind] Remove unnecessary strcpy dependency (PR #72043)

2023-11-12 Thread Michael Kenzel via cfe-commits
https://github.com/michael-kenzel edited https://github.com/llvm/llvm-project/pull/72043 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [libunwind] Remove unnecessary strcpy dependency (PR #72043)

2023-11-12 Thread Michael Kenzel via cfe-commits
https://github.com/michael-kenzel edited https://github.com/llvm/llvm-project/pull/72043 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][driver] Add \/../include/c++/v1 to include path on Darwin (PR #70817)

2023-11-12 Thread Liviu Ionescu via cfe-commits
https://github.com/ilg-ul updated https://github.com/llvm/llvm-project/pull/70817 >From 7fbc229ee7316d826517480ee7896c91dad941f3 Mon Sep 17 00:00:00 2001 From: Liviu Ionescu Date: Tue, 31 Oct 2023 17:09:04 +0200 Subject: [PATCH 1/9] Add \/../include/c++/v1 to include path On macOS, when clang

[clang] [clang][driver] Add \/../include/c++/v1 to include path on Darwin (PR #70817)

2023-11-12 Thread Liviu Ionescu via cfe-commits
ilg-ul wrote: I tried to write the test, but after several atempts I was not able to properly check the paths... :-( @ldionne, do you have any suggestions on how to fix the test? https://github.com/llvm/llvm-project/pull/70817 ___ cfe-commits mailin

[libunwind] [libunwind] Remove unnecessary strcpy dependency (PR #72043)

2023-11-12 Thread Michael Kenzel via cfe-commits
https://github.com/michael-kenzel edited https://github.com/llvm/llvm-project/pull/72043 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [libunwind] Remove unnecessary strcpy dependency (PR #72043)

2023-11-12 Thread Michael Kenzel via cfe-commits
https://github.com/michael-kenzel edited https://github.com/llvm/llvm-project/pull/72043 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [libunwind] Remove unnecessary strcpy dependency (PR #72043)

2023-11-12 Thread Michael Kenzel via cfe-commits
https://github.com/michael-kenzel edited https://github.com/llvm/llvm-project/pull/72043 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [libunwind] Remove unnecessary strcpy dependency (PR #72043)

2023-11-12 Thread Michael Kenzel via cfe-commits
https://github.com/michael-kenzel edited https://github.com/llvm/llvm-project/pull/72043 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [libunwind] Remove unnecessary strcpy dependency (PR #72043)

2023-11-12 Thread Michael Kenzel via cfe-commits
https://github.com/michael-kenzel edited https://github.com/llvm/llvm-project/pull/72043 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [libunwind] Remove unnecessary strcpy dependency (PR #72043)

2023-11-12 Thread Michael Kenzel via cfe-commits
https://github.com/michael-kenzel edited https://github.com/llvm/llvm-project/pull/72043 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] a533b76 - [clang-format][NFC] Simplify parseBracedList() (#72010)

2023-11-12 Thread via cfe-commits
Author: Owen Pan Date: 2023-11-12T15:55:06-08:00 New Revision: a533b76468ac1df54e2e541b05ba4c060a77c603 URL: https://github.com/llvm/llvm-project/commit/a533b76468ac1df54e2e541b05ba4c060a77c603 DIFF: https://github.com/llvm/llvm-project/commit/a533b76468ac1df54e2e541b05ba4c060a77c603.diff LOG:

[clang] [clang-format][NFC] Simplify parseBracedList() (PR #72010)

2023-11-12 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/72010 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenMP][Clang] Force use of `num_teams` and `thread_limit` for bare kernel (PR #68373)

2023-11-12 Thread Shilei Tian via cfe-commits
shiltian wrote: Gentle ping https://github.com/llvm/llvm-project/pull/68373 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [openmp] [OpenMP] Directly use user's grid and block size in kernel language mode (PR #70612)

2023-11-12 Thread Shilei Tian via cfe-commits
shiltian wrote: Gentle ping https://github.com/llvm/llvm-project/pull/70612 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [libunwind] Remove unnecessary strcpy dependency (PR #72043)

2023-11-12 Thread Michael Kenzel via cfe-commits
https://github.com/michael-kenzel updated https://github.com/llvm/llvm-project/pull/72043 >From d5adc242a9c52c7de2a860489a4292b7461b6164 Mon Sep 17 00:00:00 2001 From: Michael Kenzel Date: Sun, 12 Nov 2023 02:46:15 +0100 Subject: [PATCH] [libunwind] Remove unnecessary strcpy dependency --- li

[libunwind] [libunwind] Remove unnecessary strcpy dependency (PR #72043)

2023-11-12 Thread Michael Kenzel via cfe-commits
michael-kenzel wrote: I found another use of the same string copying in `tests/forceunwind.pass.cpp` and updated that to match. https://github.com/llvm/llvm-project/pull/72043 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.

[libunwind] [libunwind] Remove unnecessary strcpy dependency (PR #72043)

2023-11-12 Thread Michael Kenzel via cfe-commits
https://github.com/michael-kenzel edited https://github.com/llvm/llvm-project/pull/72043 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [libunwind] Remove unnecessary strcpy dependency (PR #72043)

2023-11-12 Thread Michael Kenzel via cfe-commits
https://github.com/michael-kenzel edited https://github.com/llvm/llvm-project/pull/72043 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [libunwind] Remove unnecessary strcpy dependency (PR #72043)

2023-11-12 Thread Alexander Richardson via cfe-commits
@@ -143,7 +143,7 @@ _Unwind_Backtrace(_Unwind_Trace_Fn callback, void *ref) { // Create a mock exception object for force unwinding. _Unwind_Exception ex; memset(&ex, '\0', sizeof(ex)); - strcpy((char *)&ex.exception_class, "CLNGUNW"); + memcpy(&ex.exception_class, "CLN

[clang] [clang][CGExprScalar] Remove no-op ptr-to-ptr bitcast (NFC) (PR #72072)

2023-11-12 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 created https://github.com/llvm/llvm-project/pull/72072 Remove bitcast added back in dcd74716f9d18 . >From b9db2565d3d2d251bde7cd84b704861d5b41bd14 Mon Sep 17 00:00:00 2001 From: JOE1994 Date: Sun, 12 Nov 2023 20:04:44 -0500 Subject: [PATCH] [clang][CGExprScalar] Rem

[clang] [clang][CGExprScalar] Remove no-op ptr-to-ptr bitcast (NFC) (PR #72072)

2023-11-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Youngsuk Kim (JOE1994) Changes Remove bitcast added back in dcd74716f9d18 . --- Full diff: https://github.com/llvm/llvm-project/pull/72072.diff 1 Files Affected: - (modified) clang/lib/CodeGen/CGExprScalar.cpp (-8) ``diff dif

[clang] [clang][CGExprScalar] Remove no-op ptr-to-ptr bitcast (NFC) (PR #72072)

2023-11-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Youngsuk Kim (JOE1994) Changes Remove bitcast added back in dcd74716f9d18 . --- Full diff: https://github.com/llvm/llvm-project/pull/72072.diff 1 Files Affected: - (modified) clang/lib/CodeGen/CGExprScalar.cpp (-8) ``

[clang] [X86][AVX10] Permit AVX512 options/features used together with AVX10 (PR #71318)

2023-11-12 Thread Phoebe Wang via cfe-commits
phoebewang wrote: @ronlieb The reproducer can compile successfully in trunk: https://godbolt.org/z/hvKhGq9bq Are you using a downstream compiler? You can check if the "emmintrin.h" has the same change as main trunk. You can also check it through pre-compile the code: ``` $ clang++ -E fd_log_sca

[clang] [clang-tools-extra] [llvm] [CodeGen][DebugInfo] Add missing debug info for jump table BB (PR #71021)

2023-11-12 Thread via cfe-commits
https://github.com/HaohaiWen updated https://github.com/llvm/llvm-project/pull/71021 >From 1be56cf6541d34e4e2ead3f4b3d3ce482d69f68f Mon Sep 17 00:00:00 2001 From: Haohai Wen Date: Thu, 2 Nov 2023 12:14:15 +0800 Subject: [PATCH 1/4] [DebugInfo] Add debug info test for jump table Test whether ju

[llvm] [clang-tools-extra] [clang] [compiler-rt] [InferAddressSpaces] Fix constant replace to avoid modifying other functions (PR #70611)

2023-11-12 Thread Wenju He via cfe-commits
wenju-he wrote: > I think it would be better if we could eliminate ConstantExpr addrspacecasts > from the IR altogether, which would avoid most of the complexity here. I > would also somewhat prefer to push this DFS into a helper function, but can > live with it inline as-is thank you for the

[clang] [clang][CGExprScalar] Remove no-op ptr-to-ptr bitcast (NFC) (PR #72072)

2023-11-12 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm edited https://github.com/llvm/llvm-project/pull/72072 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CGExprScalar] Remove no-op ptr-to-ptr bitcast (NFC) (PR #72072)

2023-11-12 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/72072 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CGExprScalar] Remove no-op ptr-to-ptr bitcast (NFC) (PR #72072)

2023-11-12 Thread Matt Arsenault via cfe-commits
@@ -2227,14 +2227,6 @@ Value *ScalarExprEmitter::VisitCastExpr(CastExpr *CE) { llvm::Value *V = CE->changesVolatileQualification() ? EmitLoadOfLValue(CE) : Visit(const_cast(E)); -if (V) { - // CK_NoOp can model a po

[llvm] [clang] [compiler-rt] [HIP] support 128 bit int division (PR #71978)

2023-11-12 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm commented: 128-bit division should already work, we have an IR integer division expansion for > 64-bit divides. I think moving towards getting the infrastructure to a place where we can link in compiler-rt binaries is a good thing, but I don't think we're in a positio

[compiler-rt] [clang] [llvm] [HIP] support 128 bit int division (PR #71978)

2023-11-12 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm edited https://github.com/llvm/llvm-project/pull/71978 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[compiler-rt] [llvm] [clang] [HIP] support 128 bit int division (PR #71978)

2023-11-12 Thread Matt Arsenault via cfe-commits
@@ -937,27 +938,105 @@ bool CodeGenAction::loadLinkModules(CompilerInstance &CI) { for (const CodeGenOptions::BitcodeFileToLink &F : CI.getCodeGenOpts().LinkBitcodeFiles) { -auto BCBuf = CI.getFileManager().getBufferForFile(F.Filename); -if (!BCBuf) { + +

[clang] [llvm] [compiler-rt] [HIP] support 128 bit int division (PR #71978)

2023-11-12 Thread Matt Arsenault via cfe-commits
@@ -937,27 +938,105 @@ bool CodeGenAction::loadLinkModules(CompilerInstance &CI) { for (const CodeGenOptions::BitcodeFileToLink &F : CI.getCodeGenOpts().LinkBitcodeFiles) { -auto BCBuf = CI.getFileManager().getBufferForFile(F.Filename); -if (!BCBuf) { + +

[clang] [llvm] [compiler-rt] [HIP] support 128 bit int division (PR #71978)

2023-11-12 Thread Matt Arsenault via cfe-commits
@@ -937,27 +938,105 @@ bool CodeGenAction::loadLinkModules(CompilerInstance &CI) { for (const CodeGenOptions::BitcodeFileToLink &F : CI.getCodeGenOpts().LinkBitcodeFiles) { -auto BCBuf = CI.getFileManager().getBufferForFile(F.Filename); -if (!BCBuf) { + +

[clang] [compiler-rt] [llvm] [HIP] support 128 bit int division (PR #71978)

2023-11-12 Thread Matt Arsenault via cfe-commits
@@ -937,27 +938,105 @@ bool CodeGenAction::loadLinkModules(CompilerInstance &CI) { for (const CodeGenOptions::BitcodeFileToLink &F : CI.getCodeGenOpts().LinkBitcodeFiles) { -auto BCBuf = CI.getFileManager().getBufferForFile(F.Filename); -if (!BCBuf) { + +

[clang] [llvm] [compiler-rt] [HIP] support 128 bit int division (PR #71978)

2023-11-12 Thread Matt Arsenault via cfe-commits
@@ -937,27 +938,105 @@ bool CodeGenAction::loadLinkModules(CompilerInstance &CI) { for (const CodeGenOptions::BitcodeFileToLink &F : CI.getCodeGenOpts().LinkBitcodeFiles) { -auto BCBuf = CI.getFileManager().getBufferForFile(F.Filename); -if (!BCBuf) { + +

[clang] [llvm] [compiler-rt] [HIP] support 128 bit int division (PR #71978)

2023-11-12 Thread Matt Arsenault via cfe-commits
@@ -596,6 +596,7 @@ static bool mustPreserveGV(const GlobalValue &GV) { if (const Function *F = dyn_cast(&GV)) return F->isDeclaration() || F->getName().startswith("__asan_") || F->getName().startswith("__sanitizer_") || + F->getName() == "__divti3" |

[clang] [llvm] [compiler-rt] [HIP] support 128 bit int division (PR #71978)

2023-11-12 Thread Matt Arsenault via cfe-commits
@@ -937,27 +938,105 @@ bool CodeGenAction::loadLinkModules(CompilerInstance &CI) { for (const CodeGenOptions::BitcodeFileToLink &F : CI.getCodeGenOpts().LinkBitcodeFiles) { -auto BCBuf = CI.getFileManager().getBufferForFile(F.Filename); -if (!BCBuf) { + +

[clang] [llvm] [compiler-rt] [HIP] support 128 bit int division (PR #71978)

2023-11-12 Thread Matt Arsenault via cfe-commits
@@ -3630,10 +3631,17 @@ SDValue SITargetLowering::LowerCall(CallLoweringInfo &CLI, std::vector Ops; Ops.push_back(Chain); + bool AddTargetGlobalAddr = true; + // Try to find the callee in the current module. + if (isa(Callee)) { +Callee = DAG.getSymbolFunctionGloba

[clang] [clang] Add per-global code model attribute (PR #72078)

2023-11-12 Thread via cfe-commits
https://github.com/heiher created https://github.com/llvm/llvm-project/pull/72078 This adds a per-global code model attribute, which can override the target's code model to access global variables. Link: https://discourse.llvm.org/t/how-to-best-implement-code-model-overriding-for-certain-valu

[clang] [compiler-rt] [llvm] [HIP] support 128 bit int division (PR #71978)

2023-11-12 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > Would it be feasible to consider switching to the new offloading driver mode > and really link with the library instead? It may be a conveniently isolated > use case with little/no existing users that would disrupt. I've thought a reasonable amount about a `compiler-rt` for GP

[clang] [clang] Add per-global code model attribute (PR #72078)

2023-11-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: hev (heiher) Changes This adds a per-global code model attribute, which can override the target's code model to access global variables. Link: https://discourse.llvm.org/t/how-to-best-implement-code-model-overriding-for-certain-values/71

[clang] [clang] Add per-global code model attribute (PR #72078)

2023-11-12 Thread via cfe-commits
https://github.com/heiher converted_to_draft https://github.com/llvm/llvm-project/pull/72078 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add per-global code model attribute (PR #72078)

2023-11-12 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff 18415c8365047841c4671798e0129ca9bbd03c40 29c89161a55c2d7355a0d0b544044ea72348c086 --

[clang] [clang] Add per-global code model attribute (PR #72078)

2023-11-12 Thread via cfe-commits
heiher wrote: Part 1: #72077 Part 3: #72079 https://github.com/llvm/llvm-project/pull/72078 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add per-global code model attribute (PR #72078)

2023-11-12 Thread via cfe-commits
https://github.com/heiher updated https://github.com/llvm/llvm-project/pull/72078 >From 323a8f851acb085a9464b3edca1206481f2aee23 Mon Sep 17 00:00:00 2001 From: WANG Rui Date: Fri, 10 Nov 2023 21:07:48 -0600 Subject: [PATCH] [clang] Add per-global code model attribute This adds a per-global cod

  1   2   >