[clang] [clang][Interp] Cleaning up `FIXME`s added during `ArrayInitLoopExpr` implementation. (PR #70053)

2024-01-25 Thread via cfe-commits
https://github.com/isuckatcs updated https://github.com/llvm/llvm-project/pull/70053 >From 7cca7a3a6d969318fb8531751f75bb41715c7475 Mon Sep 17 00:00:00 2001 From: isuckatcs <65320245+isucka...@users.noreply.github.com> Date: Sat, 30 Sep 2023 17:05:02 +0200 Subject: [PATCH 1/4] cleanup ---

[clang] [clang][Interp] Cleaning up `FIXME`s added during `ArrayInitLoopExpr` implementation. (PR #70053)

2024-01-25 Thread via cfe-commits
@@ -54,7 +54,7 @@ class ByteCodeExprGen : public ConstStmtVisitor, bool>, public: /// Initializes the compiler and the backend emitter. template - ByteCodeExprGen(Context , Program , Tys &&... Args) + ByteCodeExprGen(Context , Program , Tys &&...Args)

[clang] [NFC][FMV] Add tests to demonstrate feature priorities. (PR #79455)

2024-01-25 Thread Pavel Iliin via cfe-commits
https://github.com/ilinpv approved this pull request. LGTM, thanks for additinal FMV tests! https://github.com/llvm/llvm-project/pull/79455 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang-tools-extra] [llvm] [clang] Add test for CWG472 (PR #67948)

2024-01-25 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll closed https://github.com/llvm/llvm-project/pull/67948 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 43e46c5 - [clang] Add test for CWG472 (#67948)

2024-01-25 Thread via cfe-commits
Author: Vlad Serebrennikov Date: 2024-01-25T19:00:17+04:00 New Revision: 43e46c546a1f0c7c3e436104a974560c6a2e5188 URL: https://github.com/llvm/llvm-project/commit/43e46c546a1f0c7c3e436104a974560c6a2e5188 DIFF:

[clang] [clang][Interp] Cleaning up `FIXME`s added during `ArrayInitLoopExpr` implementation. (PR #70053)

2024-01-25 Thread via cfe-commits
https://github.com/isuckatcs updated https://github.com/llvm/llvm-project/pull/70053 >From 7cca7a3a6d969318fb8531751f75bb41715c7475 Mon Sep 17 00:00:00 2001 From: isuckatcs <65320245+isucka...@users.noreply.github.com> Date: Sat, 30 Sep 2023 17:05:02 +0200 Subject: [PATCH 1/4] cleanup ---

[clang] [NFC][FMV] Add tests to demonstrate feature priorities. (PR #79455)

2024-01-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Alexandros Lamprineas (labrinea) Changes Adds tests showing that we select function version according to the highest feature priority. This will make the changes introduced by #79316 more evident. --- Full diff:

[clang] [NFC][FMV] Add tests to demonstrate feature priorities. (PR #79455)

2024-01-25 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea created https://github.com/llvm/llvm-project/pull/79455 Adds tests showing that we select function version according to the highest feature priority. This will make the changes introduced by #79316 more evident. >From 07719ca748ad94e3c458293e46538491d771cc00 Mon

[clang] [clang][Interp] Cleaning up `FIXME`s added during `ArrayInitLoopExpr` implementation. (PR #70053)

2024-01-25 Thread Timm Baeder via cfe-commits
@@ -54,7 +54,7 @@ class ByteCodeExprGen : public ConstStmtVisitor, bool>, public: /// Initializes the compiler and the backend emitter. template - ByteCodeExprGen(Context , Program , Tys &&... Args) + ByteCodeExprGen(Context , Program , Tys &&...Args)

[clang] [clang][Interp] Cleaning up `FIXME`s added during `ArrayInitLoopExpr` implementation. (PR #70053)

2024-01-25 Thread via cfe-commits
https://github.com/isuckatcs updated https://github.com/llvm/llvm-project/pull/70053 >From 7cca7a3a6d969318fb8531751f75bb41715c7475 Mon Sep 17 00:00:00 2001 From: isuckatcs <65320245+isucka...@users.noreply.github.com> Date: Sat, 30 Sep 2023 17:05:02 +0200 Subject: [PATCH 1/3] cleanup ---

[clang] [clang][Interp] Cleaning up `FIXME`s added during `ArrayInitLoopExpr` implementation. (PR #70053)

2024-01-25 Thread via cfe-commits
https://github.com/isuckatcs edited https://github.com/llvm/llvm-project/pull/70053 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Cleaning up `FIXME`s added during `ArrayInitLoopExpr` implementation. (PR #70053)

2024-01-25 Thread via cfe-commits
@@ -54,7 +54,7 @@ class ByteCodeExprGen : public ConstStmtVisitor, bool>, public: /// Initializes the compiler and the backend emitter. template - ByteCodeExprGen(Context , Program , Tys &&... Args) + ByteCodeExprGen(Context , Program , Tys &&...Args)

[clang] [libc] [llvm] [lldb] [clang-tools-extra] [lld] [flang] [compiler-rt] [libcxx] [VPlan] Implement cloning of VPlans. (PR #73158)

2024-01-25 Thread via cfe-commits
@@ -2694,6 +2852,9 @@ class VPlan { /// been modeled in VPlan directly. DenseMap SCEVToExpansion; + /// Construct an uninitialized VPlan, should be used for cloning only. + explicit VPlan() = default; + ayalz wrote: Is it really needed? (See above)

[libc] [clang] [lldb] [flang] [clang-tools-extra] [libcxx] [llvm] [lld] [compiler-rt] [VPlan] Implement cloning of VPlans. (PR #73158)

2024-01-25 Thread via cfe-commits
@@ -982,6 +1037,94 @@ void VPlan::updateDominatorTree(DominatorTree *DT, BasicBlock *LoopHeaderBB, assert(DT->verify(DominatorTree::VerificationLevel::Fast)); } +static void remapOperands(VPBlockBase *Entry, VPBlockBase *NewEntry, + DenseMap ) { +

[clang-tools-extra] [flang] [libcxx] [llvm] [lldb] [lld] [clang] [compiler-rt] [libc] [VPlan] Implement cloning of VPlans. (PR #73158)

2024-01-25 Thread via cfe-commits
@@ -982,6 +1037,94 @@ void VPlan::updateDominatorTree(DominatorTree *DT, BasicBlock *LoopHeaderBB, assert(DT->verify(DominatorTree::VerificationLevel::Fast)); } +static void remapOperands(VPBlockBase *Entry, VPBlockBase *NewEntry, + DenseMap ) { +

[clang] [libc] [clang-tools-extra] [compiler-rt] [flang] [llvm] [libcxx] [lld] [lldb] [VPlan] Implement cloning of VPlans. (PR #73158)

2024-01-25 Thread via cfe-commits
@@ -614,6 +614,61 @@ void VPBasicBlock::print(raw_ostream , const Twine , printSuccessors(O, Indent); } #endif +static void cloneCFG(VPBlockBase *Entry, + DenseMap ); + +static VPBlockBase *cloneVPB(VPBlockBase *BB) { + if (auto *VPBB = dyn_cast(BB)) {

[lld] [llvm] [clang] [libc] [compiler-rt] [libcxx] [flang] [lldb] [clang-tools-extra] [VPlan] Implement cloning of VPlans. (PR #73158)

2024-01-25 Thread via cfe-commits
@@ -614,6 +614,61 @@ void VPBasicBlock::print(raw_ostream , const Twine , printSuccessors(O, Indent); } #endif +static void cloneCFG(VPBlockBase *Entry, + DenseMap ); + +static VPBlockBase *cloneVPB(VPBlockBase *BB) { + if (auto *VPBB = dyn_cast(BB)) {

[clang-tools-extra] [clang] [llvm] [compiler-rt] [libcxx] [flang] [lld] [lldb] [libc] [VPlan] Implement cloning of VPlans. (PR #73158)

2024-01-25 Thread via cfe-commits
@@ -982,6 +1037,94 @@ void VPlan::updateDominatorTree(DominatorTree *DT, BasicBlock *LoopHeaderBB, assert(DT->verify(DominatorTree::VerificationLevel::Fast)); } +static void remapOperands(VPBlockBase *Entry, VPBlockBase *NewEntry, + DenseMap ) { +

[lldb] [lld] [compiler-rt] [libc] [libcxx] [flang] [llvm] [clang] [clang-tools-extra] [VPlan] Implement cloning of VPlans. (PR #73158)

2024-01-25 Thread via cfe-commits
@@ -982,6 +1037,94 @@ void VPlan::updateDominatorTree(DominatorTree *DT, BasicBlock *LoopHeaderBB, assert(DT->verify(DominatorTree::VerificationLevel::Fast)); } +static void remapOperands(VPBlockBase *Entry, VPBlockBase *NewEntry, + DenseMap ) { +

[libc] [clang-tools-extra] [flang] [llvm] [lldb] [clang] [libcxx] [compiler-rt] [lld] [VPlan] Implement cloning of VPlans. (PR #73158)

2024-01-25 Thread via cfe-commits
@@ -1594,6 +1657,13 @@ class VPWidenPHIRecipe : public VPHeaderPHIRecipe { addOperand(Start); } + VPRecipeBase *clone() override { +auto *Res = new VPWidenPHIRecipe(cast(getUnderlyingInstr()), ayalz wrote: Better mark it unreachable than have

[clang-tools-extra] [clang] [llvm] [libc] [flang] [lld] [lldb] [libcxx] [compiler-rt] [VPlan] Implement cloning of VPlans. (PR #73158)

2024-01-25 Thread via cfe-commits
@@ -614,6 +614,61 @@ void VPBasicBlock::print(raw_ostream , const Twine , printSuccessors(O, Indent); } #endif +static void cloneCFG(VPBlockBase *Entry, + DenseMap ); ayalz wrote: This cloning is recursive, so perhaps more accurately

[libcxx] [clang] [lldb] [lld] [libc] [clang-tools-extra] [flang] [llvm] [compiler-rt] [VPlan] Implement cloning of VPlans. (PR #73158)

2024-01-25 Thread via cfe-commits
@@ -614,6 +614,61 @@ void VPBasicBlock::print(raw_ostream , const Twine , printSuccessors(O, Indent); } #endif +static void cloneCFG(VPBlockBase *Entry, + DenseMap ); + +static VPBlockBase *cloneVPB(VPBlockBase *BB) { ayalz wrote:

[clang] ee15e2b - [clang] Silence warning when building with MSVC targetting x86

2024-01-25 Thread Alexandre Ganea via cfe-commits
Author: Alexandre Ganea Date: 2024-01-25T09:34:17-05:00 New Revision: ee15e2bd32a4677c40d927c732b26d33f88d7865 URL: https://github.com/llvm/llvm-project/commit/ee15e2bd32a4677c40d927c732b26d33f88d7865 DIFF:

[clang-tools-extra] f33f5a0 - [clangd] Silence warning when compiling with MSVC targetting x86

2024-01-25 Thread Alexandre Ganea via cfe-commits
Author: Alexandre Ganea Date: 2024-01-25T09:34:17-05:00 New Revision: f33f5a04e9feeb9b473694825d84da8322f87df9 URL: https://github.com/llvm/llvm-project/commit/f33f5a04e9feeb9b473694825d84da8322f87df9 DIFF:

[clang] 419d6ea - [clang] Silence warning when compiling with MSVC targetting x86

2024-01-25 Thread Alexandre Ganea via cfe-commits
Author: Alexandre Ganea Date: 2024-01-25T09:34:17-05:00 New Revision: 419d6ea135dd205e1eaab368a58ae14f9f52f699 URL: https://github.com/llvm/llvm-project/commit/419d6ea135dd205e1eaab368a58ae14f9f52f699 DIFF:

[clang] [clang][Interp] Handle complex values in visitBool() (PR #79452)

2024-01-25 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr unassigned https://github.com/llvm/llvm-project/pull/79452 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Handle complex values in visitBool() (PR #79452)

2024-01-25 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr unassigned https://github.com/llvm/llvm-project/pull/79452 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Handle complex values in visitBool() (PR #79452)

2024-01-25 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr unassigned https://github.com/llvm/llvm-project/pull/79452 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Handle complex values in visitBool() (PR #79452)

2024-01-25 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr unassigned https://github.com/llvm/llvm-project/pull/79452 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [libcxx] [flang] [lldb] [llvm] [libunwind] [compiler-rt] [lld] [libc] [clang] [X86] Use RORX over SHR imm (PR #77964)

2024-01-25 Thread Simon Pilgrim via cfe-commits
@@ -4216,6 +4217,97 @@ MachineSDNode *X86DAGToDAGISel::emitPCMPESTR(unsigned ROpc, unsigned MOpc, return CNode; } +// When the consumer of a right shift (arithmetic or logical) wouldn't notice +// the difference if the instruction was a rotate right instead (because the

[libc] [lld] [clang-tools-extra] [libcxx] [libunwind] [compiler-rt] [lldb] [flang] [llvm] [clang] [X86] Use RORX over SHR imm (PR #77964)

2024-01-25 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon requested changes to this pull request. https://github.com/llvm/llvm-project/pull/77964 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [clang-tools-extra] [libc] [flang] [lldb] [lld] [compiler-rt] [libcxx] [llvm] [clang] [X86] Use RORX over SHR imm (PR #77964)

2024-01-25 Thread Simon Pilgrim via cfe-commits
@@ -4216,6 +4217,97 @@ MachineSDNode *X86DAGToDAGISel::emitPCMPESTR(unsigned ROpc, unsigned MOpc, return CNode; } +// When the consumer of a right shift (arithmetic or logical) wouldn't notice +// the difference if the instruction was a rotate right instead (because the

[clang] [libunwind] [libcxx] [flang] [compiler-rt] [clang-tools-extra] [libc] [lldb] [llvm] [lld] [X86] Use RORX over SHR imm (PR #77964)

2024-01-25 Thread Simon Pilgrim via cfe-commits
@@ -4216,6 +4217,97 @@ MachineSDNode *X86DAGToDAGISel::emitPCMPESTR(unsigned ROpc, unsigned MOpc, return CNode; } +// When the consumer of a right shift (arithmetic or logical) wouldn't notice +// the difference if the instruction was a rotate right instead (because the

[libc] [clang-tools-extra] [llvm] [compiler-rt] [clang] [lldb] [lld] [flang] [libcxx] [libunwind] [X86] Use RORX over SHR imm (PR #77964)

2024-01-25 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon edited https://github.com/llvm/llvm-project/pull/77964 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Allow specifying what headers are always included via "" or <> (PR #67749)

2024-01-25 Thread kleines Filmröllchen via cfe-commits
kleinesfilmroellchen wrote: > It's sad that there's not a single codepath that would handle all these, but > maybe the perfect is the enemy of the good here. The code duplication was my reason for looking at the common path. If you're fine with duplicating the code I will go ahead and do

[clang] [clang][Interp] Handle complex values in visitBool() (PR #79452)

2024-01-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes In C++, we get a ComplexToBool cast, but we might not in C. --- Full diff: https://github.com/llvm/llvm-project/pull/79452.diff 4 Files Affected: - (modified) clang/lib/AST/Interp/ByteCodeExprGen.cpp

[clang] [clang][Interp] Handle complex values in visitBool() (PR #79452)

2024-01-25 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/79452 In C++, we get a ComplexToBool cast, but we might not in C. >From b207bff4cda462869bcf8547e44d23e5b8fc5e94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Thu, 25 Jan 2024 15:20:52 +0100

[clang-tools-extra] [clangd] Allow specifying what headers are always included via "" or <> (PR #67749)

2024-01-25 Thread kleines Filmröllchen via cfe-commits
@@ -211,10 +214,12 @@ class IncludeInserter { // include path of non-verbatim header will not be shortened. IncludeInserter(StringRef FileName, StringRef Code, const format::FormatStyle , StringRef BuildDir, - HeaderSearch

[clang-tools-extra] [clangd] Attempt to fix https://github.com/clangd/clangd/issues/1536 (PR #79448)

2024-01-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangd Author: Tor Shepherd (torshepherd) Changes This PR attempts to fix [1536.](https://github.com/clangd/clangd/issues/1536). See in the unit tests, when all quick fixes are of the same `code`, `isPreferred` will be true. However, this doesn't seem

[clang-tools-extra] [clangd] Attempt to fix https://github.com/clangd/clangd/issues/1536 (PR #79448)

2024-01-25 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it

[clang-tools-extra] [clangd] Attempt to fix https://github.com/clangd/clangd/issues/1536 (PR #79448)

2024-01-25 Thread Tor Shepherd via cfe-commits
https://github.com/torshepherd created https://github.com/llvm/llvm-project/pull/79448 This PR attempts to fix [1536.](https://github.com/clangd/clangd/issues/1536). See in the unit tests, when all quick fixes are of the same `code`, `isPreferred` will be true. However, this doesn't seem to

[clang-tools-extra] [clangd] Allow specifying what headers are always included via "" or <> (PR #67749)

2024-01-25 Thread kleines Filmröllchen via cfe-commits
@@ -296,6 +296,19 @@ struct Fragment { // ::). All nested namespaces are affected as well. // Affects availability of the AddUsing tweak. std::vector> FullyQualifiedNamespaces; + +/// List of regexes for headers that should always be included with a +///

[libcxx] [clang] [SemaCXX] Implement CWG2137 (list-initialization from objects of the same type) (PR #77768)

2024-01-25 Thread Erich Keane via cfe-commits
erichkeane wrote: >As I understood the author, more time was needed to prepare the tests and the >fix. I just tried to bring the tip of the tree to a good state soon (our >internal release process was blocked on this) without putting any pressure on >the author. Typically when the author is

[lld] [flang] [llvm] [clang] [AMDGPU] Introduce GFX9/10.1/10.3/11 Generic Targets (PR #76955)

2024-01-25 Thread Konstantin Zhuravlyov via cfe-commits
@@ -49,6 +49,11 @@ constexpr uint32_t VersionMajorV5 = 1; /// HSA metadata minor version for code object V5. constexpr uint32_t VersionMinorV5 = 2; +/// HSA metadata major version for code object V6. +constexpr uint32_t VersionMajorV6 = 1; +/// HSA metadata minor version for

[clang] [llvm] [Clang][SME] Detect always_inline used with mismatched streaming attributes (PR #77936)

2024-01-25 Thread Sam Tebbs via cfe-commits
SamTebbs33 wrote: Agreed. I tried moving it to Support but that introduced a dependency cycle, so I re-implemented some of the SMEAttributes logic in-place instead. https://github.com/llvm/llvm-project/pull/77936

[clang] [NVPTX] Add support for -march=native in standalone NVPTX (PR #79373)

2024-01-25 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/79373 >From 145b7bc932ce3ffa46545cd7af29b1c93981429c Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Wed, 24 Jan 2024 15:34:00 -0600 Subject: [PATCH 1/3] [NVPTX] Add support for -march=native in standalone NVPTX

[clang] [NVPTX] Add support for -march=native in standalone NVPTX (PR #79373)

2024-01-25 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/79373 >From 145b7bc932ce3ffa46545cd7af29b1c93981429c Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Wed, 24 Jan 2024 15:34:00 -0600 Subject: [PATCH 1/2] [NVPTX] Add support for -march=native in standalone NVPTX

[clang] Add option -fstdlib-hardening= (PR #78763)

2024-01-25 Thread Louis Dionne via cfe-commits
@@ -851,6 +851,28 @@ static void InitializePredefinedMacros(const TargetInfo , Twine(getClangFullCPPVersion()) + "\""); // Initialize language-specific preprocessor defines. + if (LangOpts.getStdlibHardeningMode()) { +const char

[llvm] [clang-tools-extra] [clang] [DebugInfo][RemoveDIs] Add a DPValue implementation for instcombine sinking (PR #77930)

2024-01-25 Thread Stephen Tozer via cfe-commits
https://github.com/SLTozer approved this pull request. LGTM with latest changes. https://github.com/llvm/llvm-project/pull/77930 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang-tools-extra] [clang] [DebugInfo][RemoveDIs] Add a DPValue implementation for instcombine sinking (PR #77930)

2024-01-25 Thread Stephen Tozer via cfe-commits
@@ -4266,19 +4285,140 @@ bool InstCombinerImpl::tryToSinkInstruction(Instruction *I, // Perform salvaging without the clones, then sink the clones. if (!DIIClones.empty()) { -// RemoveDIs: pass in empty vector of DPValues until we get to instrumenting -// this

[clang] [NVPTX] Add support for -march=native in standalone NVPTX (PR #79373)

2024-01-25 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > I think I'm with Art on this one. > > > > Problem #2 [...] The arch=native will create a working configuration, but > > > would build more than necessary. > > > > > > It will target the first GPU it finds. We could maybe change the behavior > > to detect the newest, but the

[clang] [analyzer] Avoid a crash in a debug printout function (PR #79446)

2024-01-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: None (NagyDonat) Changes Previously the function `RangeConstraintManager::printValue()` crashed when it encountered an empty rangeset (because `RangeSet::getBitwidth()` and `RangeSet::isUnsigned()` assert that the

[clang] [PowerPC] Diagnose invalid combination with Altivec, VSX and soft-float (PR #79109)

2024-01-25 Thread Chen Zheng via cfe-commits
chenzheng1030 wrote: Patch updated. https://github.com/llvm/llvm-project/pull/79109 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Avoid a crash in a debug printout function (PR #79446)

2024-01-25 Thread via cfe-commits
https://github.com/NagyDonat created https://github.com/llvm/llvm-project/pull/79446 Previously the function `RangeConstraintManager::printValue()` crashed when it encountered an empty rangeset (because `RangeSet::getBitwidth()` and `RangeSet::isUnsigned()` assert that the rangeset is not

[clang] [PowerPC] Diagnose invalid combination with Altivec, VSX and soft-float (PR #79109)

2024-01-25 Thread Chen Zheng via cfe-commits
https://github.com/chenzheng1030 updated https://github.com/llvm/llvm-project/pull/79109 >From 014b10f43e2d3f8564940e21033cee77c3c0c10e Mon Sep 17 00:00:00 2001 From: Nemanja Ivanovic Date: Tue, 23 Jan 2024 03:25:01 -0500 Subject: [PATCH 1/2] [PowerPC] Diagnose invalid combination with

[clang] [ObjC] Defer to the LLVM backend for unaligned atomic load and stores (PR #79191)

2024-01-25 Thread James Y Knight via cfe-commits
jyknight wrote: Does this cause an ABI incompatibility? E.g. if we have a case where an existing object calls copyStruct on a given object (which presumably has its own internal mutex), and a newly compiled object file calls `__atomic_load` on the same object, implemented with its own

[clang] [AMDGPU][GFX12] Add tests for unsupported builtins (PR #78729)

2024-01-25 Thread Mariusz Sikora via cfe-commits
https://github.com/mariusz-sikora-at-amd updated https://github.com/llvm/llvm-project/pull/78729 >From 56cf06f1b530d5ec62de1cc3818bf2f76dfd Mon Sep 17 00:00:00 2001 From: Mariusz Sikora Date: Fri, 19 Jan 2024 16:29:46 +0100 Subject: [PATCH] [AMDGPU][GFX12] Add tests for unsupported

[clang] cd0b005 - [clang][Interp][NFC] Add some working _Complex tests

2024-01-25 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-01-25T14:21:59+01:00 New Revision: cd0b0055a730e55f2f14f35172e05dc27642f8ce URL: https://github.com/llvm/llvm-project/commit/cd0b0055a730e55f2f14f35172e05dc27642f8ce DIFF: https://github.com/llvm/llvm-project/commit/cd0b0055a730e55f2f14f35172e05dc27642f8ce.diff

[libc] [flang] [libunwind] [libcxx] [clang-tools-extra] [compiler-rt] [lldb] [clang] [llvm] [mlir] [lld] Reland: [libc++][format] P2637R3: Member visit (std::basic_format_arg) #76449 (PR #79032)

2024-01-25 Thread Hristo Hristov via cfe-commits
https://github.com/H-G-Hristov updated https://github.com/llvm/llvm-project/pull/79032 >From e03452fda84a5284420bba1913299b68caabb6cd Mon Sep 17 00:00:00 2001 From: Zingam Date: Mon, 22 Jan 2024 20:35:00 +0200 Subject: [PATCH 1/2] Revert "Revert "[libc++][format] P2637R3: Member `visit`

[clang] [Clang][RISCV][RVV Intrinsic] Fix codegen redundant intrinsic names (PR #77889)

2024-01-25 Thread Brandon Wu via cfe-commits
https://github.com/4vtomat approved this pull request. Thanks, LGTM~ https://github.com/llvm/llvm-project/pull/77889 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema]Substitue parameter packs when deduced from function parameter (PR #79371)

2024-01-25 Thread Gábor Spaits via cfe-commits
https://github.com/spaits updated https://github.com/llvm/llvm-project/pull/79371 From d4ca5c2fcb87f424be23efc4513df491403c3811 Mon Sep 17 00:00:00 2001 From: Gabor Spaits Date: Wed, 24 Jan 2024 21:21:26 +0100 Subject: [PATCH 1/7] [Sema]Substitue template parameter packs when deduced from

[clang] [RISCV][clang] Optimize memory usage of intrinsic lookup table (PR #77487)

2024-01-25 Thread Brandon Wu via cfe-commits
@@ -380,14 +380,14 @@ void RISCVIntrinsicManagerImpl::InitRVVIntrinsic( OverloadedName += "_" + OverloadedSuffixStr.str(); // clang built-in function name, e.g. __builtin_rvv_vadd. - std::string BuiltinName = "__builtin_rvv_" + std::string(Record.Name); + std::string

[clang] [RISCV][clang] Optimize memory usage of intrinsic lookup table (PR #77487)

2024-01-25 Thread Brandon Wu via cfe-commits
https://github.com/4vtomat updated https://github.com/llvm/llvm-project/pull/77487 >From 84ea759c43d8e9cb450d95d00fd802be622153a2 Mon Sep 17 00:00:00 2001 From: Brandon Wu Date: Sun, 7 Jan 2024 18:10:59 -0800 Subject: [PATCH 1/2] [RISCV][clang] Optimize memory usage of intrinsic lookup table

[clang] [clang][analyzer] Simplify code of StreamChecker (NFC). (PR #79312)

2024-01-25 Thread via cfe-commits
NagyDonat wrote: Yes, the "common big set of arguments" is an annoying problem. Perhaps you could consider my solution in core.BitwiseShift where I introduced a "validator" class that holds all the common arguments as data members, so instead of helper functions you have helper methods that

[clang] f4ed7f8 - [clang][Parse][NFC] Make a local variable const

2024-01-25 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-01-25T13:29:39+01:00 New Revision: f4ed7f8d0a3830d05e53476fc64966e871bf9454 URL: https://github.com/llvm/llvm-project/commit/f4ed7f8d0a3830d05e53476fc64966e871bf9454 DIFF: https://github.com/llvm/llvm-project/commit/f4ed7f8d0a3830d05e53476fc64966e871bf9454.diff

[clang] [Sema]Substitue parameter packs when deduced from function parameter (PR #79371)

2024-01-25 Thread Gábor Spaits via cfe-commits
@@ -431,6 +442,17 @@ namespace deduction_after_explicit_pack { i(0, 1, 2, 3, 4, 5); // expected-error {{no match}} } + template + void bar(args_tag, type_identity_t..., int mid, type_identity_t...) {} spaits wrote: It could work. It would cost only

[clang] [clang][analyzer] Simplify code of StreamChecker (NFC). (PR #79312)

2024-01-25 Thread Balázs Kéri via cfe-commits
balazske wrote: My concern was the addition of many small functions that are used only from few other `eval*` calls and are relatively special. And all of these need a common big set of arguments like `StreamSym`, `CE`, `Call`. The build of states for success and failure cases in the thing

[lld] [llvm] [clang] Embed the command line arguments during LTO (PR #79390)

2024-01-25 Thread Duncan Ogilvie via cfe-commits
mrexodia wrote: > I haven't checked closely yet, but it seems like you need to add tests. Could you provide some guidance on what kind of tests to add and how to actually run them locally? First I wanted to get the builtkite job to be green, but it seems to be failing on some unrelated test

[llvm] [flang] [libc] [libcxx] [clang] [mlir] [clang-tools-extra] [openmp] [libcxxabi] [compiler-rt] [AArch64] Combine store (trunc X to <3 x i8>) to sequence of ST1.b. (PR #78637)

2024-01-25 Thread Florian Hahn via cfe-commits
@@ -21471,6 +21471,53 @@ bool isHalvingTruncateOfLegalScalableType(EVT SrcVT, EVT DstVT) { (SrcVT == MVT::nxv2i64 && DstVT == MVT::nxv2i32); } +// Combine store (trunc X to <3 x i8>) to sequence of ST1.b. +static SDValue combineI8TruncStore(StoreSDNode *ST,

[lld] [llvm] [clang] Embed the command line arguments during LTO (PR #79390)

2024-01-25 Thread Duncan Ogilvie via cfe-commits
@@ -40,6 +41,7 @@ using namespace llvm; namespace lld::wasm { static std::unique_ptr createLTO() { lto::Config c; + c.EmbedCmdArgs = commonContext().cmdArgs; mrexodia wrote: I changed all the `commonContext()` to `context()` (or the `ctx` variable

[lld] [llvm] [clang] Embed the command line arguments during LTO (PR #79390)

2024-01-25 Thread Duncan Ogilvie via cfe-commits
https://github.com/mrexodia updated https://github.com/llvm/llvm-project/pull/79390 >From 67280cb8a77931271e685f7c92718d45cfea69a8 Mon Sep 17 00:00:00 2001 From: Duncan Ogilvie Date: Thu, 25 Jan 2024 00:08:49 +0100 Subject: [PATCH] Embed the command line arguments during LTO ---

[llvm] [flang] [libc] [libcxx] [clang] [mlir] [clang-tools-extra] [openmp] [libcxxabi] [compiler-rt] [AArch64] Combine store (trunc X to <3 x i8>) to sequence of ST1.b. (PR #78637)

2024-01-25 Thread Florian Hahn via cfe-commits
https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/78637 >From efd07e93aed51049ad3783c701284617ae446330 Mon Sep 17 00:00:00 2001 From: Florian Hahn Date: Wed, 17 Jan 2024 11:11:59 + Subject: [PATCH 1/7] [AArch64] Combine store (trunc X to <3 x i8>) to sequence of

[clang] [Coverage] Map regions from system headers (PR #76950)

2024-01-25 Thread NAKAMURA Takumi via cfe-commits
chapuni wrote: Seems this causes the crash with `-fcoverage-mcdc -mllvm -system-headers-coverage`. Investigating. See also #78920. https://github.com/llvm/llvm-project/pull/76950 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [AArch64] Simplify Clang's description of architecture extensions (PR #79311)

2024-01-25 Thread via cfe-commits
@@ -860,7 +841,7 @@ bool AArch64TargetInfo::handleTargetFeatures(std::vector , } if (Feature == "+dit") HasDIT = true; -if (Feature == "+cccp") +if (Feature == "+ccpp") ostannard wrote: Again, does this need a test?

[clang] [AArch64] Simplify Clang's description of architecture extensions (PR #79311)

2024-01-25 Thread via cfe-commits
@@ -741,7 +722,7 @@ bool AArch64TargetInfo::handleTargetFeatures(std::vector , if (Feature == "+neon" || Feature == "+fp-armv8") FPU |= NeonMode; -if (Feature == "+jscvt") { +if (Feature == "+jsconv") { ostannard wrote: This looks like bug

[libcxx] [lld] [lldb] [flang] [compiler-rt] [llvm] [libcxxabi] [libclc] [clang] [libc] [clang-tools-extra] [VPlan] Add new VPScalarCastRecipe, use for IV & step trunc. (PR #78113)

2024-01-25 Thread Florian Hahn via cfe-commits
@@ -498,10 +498,34 @@ static VPValue *createScalarIVSteps(VPlan , const InductionDescriptor , VPCanonicalIVPHIRecipe *CanonicalIV = Plan.getCanonicalIV(); Type *TruncTy = TruncI ? TruncI->getType() : IVTy; VPValue *BaseIV = CanonicalIV; fhahn wrote:

[libclc] [libcxx] [libcxxabi] [llvm] [clang-tools-extra] [flang] [libc] [compiler-rt] [lldb] [lld] [clang] [VPlan] Add new VPScalarCastRecipe, use for IV & step trunc. (PR #78113)

2024-01-25 Thread Florian Hahn via cfe-commits
@@ -1469,6 +1461,52 @@ void VPReplicateRecipe::print(raw_ostream , const Twine , } #endif +static bool isUniformAcrossVFsAndUFs(VPScalarCastRecipe *C) { + return C->isDefinedOutsideVectorRegions() || + isa(C->getOperand(0)) || + isa(C->getOperand(0)); +} +

[llvm] [flang] [libc] [lld] [libclc] [libcxx] [lldb] [clang] [clang-tools-extra] [libcxxabi] [compiler-rt] [VPlan] Add new VPScalarCastRecipe, use for IV & step trunc. (PR #78113)

2024-01-25 Thread Florian Hahn via cfe-commits
https://github.com/fhahn commented: Comments should be addressed and title & description updated, thanks! https://github.com/llvm/llvm-project/pull/78113 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[compiler-rt] [lldb] [flang] [libc] [libcxxabi] [llvm] [lld] [libcxx] [clang] [libclc] [clang-tools-extra] [VPlan] Add new VPScalarCastRecipe, use for IV & step trunc. (PR #78113)

2024-01-25 Thread Florian Hahn via cfe-commits
@@ -230,7 +230,11 @@ Type *VPTypeAnalysis::inferScalarType(const VPValue *V) { return V->getUnderlyingValue()->getType(); }) .Case( - [](const VPWidenCastRecipe *R) { return R->getResultType(); }); + [](const

[libcxx] [libcxxabi] [clang] [flang] [lldb] [llvm] [libclc] [clang-tools-extra] [compiler-rt] [libc] [lld] [VPlan] Add new VPScalarCastRecipe, use for IV & step trunc. (PR #78113)

2024-01-25 Thread Florian Hahn via cfe-commits
https://github.com/fhahn edited https://github.com/llvm/llvm-project/pull/78113 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libc] [compiler-rt] [libclc] [lldb] [clang-tools-extra] [flang] [libcxx] [libcxxabi] [llvm] [lld] [clang] [VPlan] Add new VPScalarCastRecipe, use for IV & step trunc. (PR #78113)

2024-01-25 Thread Florian Hahn via cfe-commits
@@ -1469,6 +1461,52 @@ void VPReplicateRecipe::print(raw_ostream , const Twine , } #endif +static bool isUniformAcrossVFsAndUFs(VPScalarCastRecipe *C) { fhahn wrote: Added comment + TODO, thanks! https://github.com/llvm/llvm-project/pull/78113

[libcxx] [libcxxabi] [clang] [flang] [lldb] [llvm] [libclc] [clang-tools-extra] [compiler-rt] [libc] [lld] [VPlan] Add new VPScalarCastRecipe, use for IV & step trunc. (PR #78113)

2024-01-25 Thread Florian Hahn via cfe-commits
https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/78113 >From 36b085f21b76d7bf7c9965a86a09d1cef4fe9329 Mon Sep 17 00:00:00 2001 From: Florian Hahn Date: Sun, 14 Jan 2024 14:13:08 + Subject: [PATCH 1/6] [VPlan] Add new VPUniformPerUFRecipe, use for step truncation.

[libcxx] [libcxxabi] [clang] [flang] [lldb] [llvm] [libclc] [clang-tools-extra] [compiler-rt] [libc] [lld] [VPlan] Add new VPScalarCastRecipe, use for IV & step trunc. (PR #78113)

2024-01-25 Thread Florian Hahn via cfe-commits
https://github.com/fhahn edited https://github.com/llvm/llvm-project/pull/78113 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenMP][Clang] Handle unsupported inscan modifier for generic types (PR #79431)

2024-01-25 Thread Alexey Bataev via cfe-commits
@@ -19520,6 +19520,13 @@ static bool actOnOMPReductionKindClause( bool FirstIter = true; for (Expr *RefExpr : VarList) { assert(RefExpr && "nullptr expr in OpenMP reduction clause."); +if (ClauseKind == OMPC_reduction && +RD.RedModifier ==

[libc] [compiler-rt] [libclc] [lldb] [clang-tools-extra] [flang] [libcxx] [libcxxabi] [llvm] [lld] [clang] [VPlan] Add new VPScalarCastRecipe, use for IV & step trunc. (PR #78113)

2024-01-25 Thread Florian Hahn via cfe-commits
https://github.com/fhahn edited https://github.com/llvm/llvm-project/pull/78113 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Simplify code of StreamChecker (NFC). (PR #79312)

2024-01-25 Thread Balazs Benics via cfe-commits
steakhal wrote: > I'm seconding the suggestions of @steakhal, and in particular I agree with > > > I'd also advise against using more callables bundled with CallDescriptions. > > They make debugging code more difficult, as the control-flow would become > > also data-dependent. I'd suggest

[clang] [clang][analyzer] Simplify code of StreamChecker (NFC). (PR #79312)

2024-01-25 Thread via cfe-commits
NagyDonat wrote: I'm seconding the suggestions of @steakhal, and in particular I agree with > I'd also advise against using more callables bundled with CallDescriptions. > They make debugging code more difficult, as the control-flow would become > also data-dependent. I'd suggest other ways to

[clang] [Sema]Substitue parameter packs when deduced from function parameter (PR #79371)

2024-01-25 Thread Gábor Spaits via cfe-commits
https://github.com/spaits updated https://github.com/llvm/llvm-project/pull/79371 From d4ca5c2fcb87f424be23efc4513df491403c3811 Mon Sep 17 00:00:00 2001 From: Gabor Spaits Date: Wed, 24 Jan 2024 21:21:26 +0100 Subject: [PATCH 1/6] [Sema]Substitue template parameter packs when deduced from

[clang] [OpenMP][Clang] Handle unsupported inscan modifier for generic types (PR #79431)

2024-01-25 Thread Saiyedul Islam via cfe-commits
@@ -12,28 +12,6 @@ void foo() {} -template saiislam wrote: How was this test case working till now when templates were not supported in scan? https://github.com/llvm/llvm-project/pull/79431 ___ cfe-commits

[clang] [clang][dataflow] Treat comma operator correctly in `getResultObjectLocation()`. (PR #78427)

2024-01-25 Thread via cfe-commits
martinboehme wrote: > > You mean the publicness of `getResultObjectLocation()`? > > Yeah, I was wondering if it would be more user friendly if something like > `State.Env.get(Expr);` would automatically recognize > that the user actually wants the result location and returned that without >

[clang] [clang][Diagnostics] Highlight code snippets (PR #66514)

2024-01-25 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/66514 >From 2a0b02a285203228944d5dd206f968e776757993 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 15 Sep 2023 15:51:39 +0200 Subject: [PATCH] [clang][Diagnostics] Highlight code snippets

[clang] [clang][Interp] Cleaning up `FIXME`s added during `ArrayInitLoopExpr` implementation. (PR #70053)

2024-01-25 Thread Timm Baeder via cfe-commits
@@ -389,10 +390,29 @@ template class LocalScope : public VariableScope { if (!Local.Desc->isPrimitive() && !Local.Desc->isPrimitiveArray()) { this->Ctx->emitGetPtrLocal(Local.Offset, SourceInfo{}); this->Ctx->emitRecordDestruction(Local.Desc); +

[clang] [clang][Interp] Cleaning up `FIXME`s added during `ArrayInitLoopExpr` implementation. (PR #70053)

2024-01-25 Thread Timm Baeder via cfe-commits
@@ -54,7 +54,7 @@ class ByteCodeExprGen : public ConstStmtVisitor, bool>, public: /// Initializes the compiler and the backend emitter. template - ByteCodeExprGen(Context , Program , Tys &&... Args) + ByteCodeExprGen(Context , Program , Tys &&...Args)

[clang] [clang][Interp] Cleaning up `FIXME`s added during `ArrayInitLoopExpr` implementation. (PR #70053)

2024-01-25 Thread Timm Baeder via cfe-commits
@@ -389,10 +390,29 @@ template class LocalScope : public VariableScope { if (!Local.Desc->isPrimitive() && !Local.Desc->isPrimitiveArray()) { this->Ctx->emitGetPtrLocal(Local.Offset, SourceInfo{}); this->Ctx->emitRecordDestruction(Local.Desc); +

[clang] [Sema]Substitue parameter packs when deduced from function parameter (PR #79371)

2024-01-25 Thread Gábor Spaits via cfe-commits
https://github.com/spaits edited https://github.com/llvm/llvm-project/pull/79371 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Unbreak [[clang::suppress]] on checkers without decl-with-issue. (PR #79398)

2024-01-25 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/79398 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Unbreak [[clang::suppress]] on checkers without decl-with-issue. (PR #79398)

2024-01-25 Thread Balazs Benics via cfe-commits
@@ -44,7 +47,9 @@ class BugSuppression { using CachedRanges = llvm::SmallVector; - llvm::DenseMap CachedSuppressionLocations; + llvm::DenseMap CachedSuppressionLocations{}; + + ASTContext steakhal wrote: ```suggestion llvm::DenseMap

[clang] [analyzer] Unbreak [[clang::suppress]] on checkers without decl-with-issue. (PR #79398)

2024-01-25 Thread Balazs Benics via cfe-commits
@@ -27,6 +28,8 @@ class PathDiagnosticLocation; class BugSuppression { public: + BugSuppression(ASTContext ) : ACtx(ACtx) {} steakhal wrote: ```suggestion explicit BugSuppression(const ASTContext ) : ACtx(ACtx) {} ```

[clang] [analyzer] Unbreak [[clang::suppress]] on checkers without decl-with-issue. (PR #79398)

2024-01-25 Thread Balazs Benics via cfe-commits
https://github.com/steakhal commented: I only have minor nits. No objections. https://github.com/llvm/llvm-project/pull/79398 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema]Substitue parameter packs when deduced from function parameter (PR #79371)

2024-01-25 Thread Gábor Spaits via cfe-commits
@@ -4371,6 +4397,41 @@ Sema::TemplateDeductionResult Sema::DeduceTemplateArguments( // corresponding argument is a list? PackScope.nextPackElement(); } + } else if (!IsTrailingPack && !PackScope.isPartiallyExpanded() && +

<    1   2   3   4   5   6   >