[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 &TI, Twine(getClangFullCPPVersion()) + "\""); // Initialize language-specific preprocessor defines. + if (LangOpts.getStdlibHardeningMode()) { +const char *StdlibHardenin

[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 Sum

[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 Sum

[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 ___

[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 c

[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 e

[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 +/// ""-

[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 ch

[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 i

[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] 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 &Style, StringRef BuildDir, - HeaderSearch *HeaderSea

[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 Subj

[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 (+65-

[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 that.

[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] [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 +//

[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 +//

[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

[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 +//

[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] 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: https://github.com/llvm/llvm-project/commit/419d6ea135dd205e1eaab368a58ae14f9f52f699.dif

[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: https://github.com/llvm/llvm-project/commit/ee15e2bd32a4677c40d927c732b26d33f88d7865.dif

[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: https://github.com/llvm/llvm-project/commit/f33f5a04e9feeb9b473694825d84da8322f87df9.dif

[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 &O, const Twine &Indent, printSuccessors(O, Indent); } #endif +static void cloneCFG(VPBlockBase *Entry, + DenseMap &Old2NewVPBlocks); + +static VPBlockBase *cloneVPB(VPBlockBase *BB) {

[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 &O, const Twine &Indent, printSuccessors(O, Indent); } #endif +static void cloneCFG(VPBlockBase *Entry, + DenseMap &Old2NewVPBlocks); ayalz wrote: This cloning is recursive, so pe

[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 unt

[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 &Old2Ne

[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 &O, const Twine &Indent, printSuccessors(O, Indent); } #endif +static void cloneCFG(VPBlockBase *Entry, + DenseMap &Old2NewVPBlocks); + +static VPBlockBase *cloneVPB(VPBlockBase *BB) { + if (auto

[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 &Old2Ne

[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 &O, const Twine &Indent, printSuccessors(O, Indent); } #endif +static void cloneCFG(VPBlockBase *Entry, + DenseMap &Old2NewVPBlocks); + +static VPBlockBase *cloneVPB(VPBlockBase *BB) { + if (auto

[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 &Old2Ne

[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 &Old2Ne

[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) htt

[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 &Ctx, Program &P, Tys &&... Args) + ByteCodeExprGen(Context &Ctx, Program &P, 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 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
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 --- clan

[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 &Ctx, Program &P, Tys &&... Args) + ByteCodeExprGen(Context &Ctx, Program &P, Tys &&...Args) --

[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 Sep

[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: https://github.com/llvm/l

[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 --- clan

[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: https://github.com/llvm/llvm-project/commit/43e46c546a1f0c7c3e436104a974560c6a2e5188.

[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] [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 https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

[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 &Ctx, Program &P, Tys &&... Args) + ByteCodeExprGen(Context &Ctx, Program &P, 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/4] cleanup --- clan

[clang] [llvm] [FMV] Add alias for FEAT_RDM and change priorities according to ACLE. (PR #79316)

2024-01-25 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea updated https://github.com/llvm/llvm-project/pull/79316 >From 07719ca748ad94e3c458293e46538491d771cc00 Mon Sep 17 00:00:00 2001 From: Alexandros Lamprineas Date: Thu, 25 Jan 2024 14:09:06 + Subject: [PATCH 1/2] [NFC][FMV] Add tests to demonstrate feature prioriti

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

2024-01-25 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr approved this pull request. 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] [analyzer] Avoid a crash in a debug printout function (PR #79446)

2024-01-25 Thread Balazs Benics via cfe-commits
steakhal wrote: When is it possible to have an empty range set as a constraint? https://github.com/llvm/llvm-project/pull/79446 ___ 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
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 e4384149b58f7c3d19c5d38bc46038c660b77ca9 d6cb68b4a814eb42f7f6d12e17d3fd94054fe1e8 --

[clang] [llvm] [FMV] Add alias for FEAT_RDM and change priorities according to ACLE. (PR #79316)

2024-01-25 Thread Pavel Iliin via cfe-commits
@@ -114,6 +121,10 @@ const AArch64::ArchInfo *AArch64::parseArch(StringRef Arch) { } std::optional AArch64::parseArchExtension(StringRef ArchExt) { + // Resolve aliases first. + ArchExt = resolveExtAlias(ArchExt); ilinpv wrote: Seems resolving aliases her

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

2024-01-25 Thread via cfe-commits
NagyDonat wrote: When I added `RangeConstraintManager::printValue()` calls at the top of `evalBinOpNN` (while doing printf-style debugging), I got crashes from the test files `infeasible-sink.c` and `constant-folding-crash.cpp`. I'd guess that getting an empty range set stops the analysis quic

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

2024-01-25 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/79446 ___ 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 Balazs Benics via cfe-commits
@@ -3270,8 +3270,12 @@ void RangeConstraintManager::printJson(raw_ostream &Out, ProgramStateRef State, void RangeConstraintManager::printValue(raw_ostream &Out, ProgramStateRef State, SymbolRef Sym) { const RangeSet RS = getRange(Stat

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

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

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

2024-01-25 Thread Bryce Wilson via cfe-commits
https://github.com/Bryce-MW updated https://github.com/llvm/llvm-project/pull/77964 >From d4c312b9dbf447d0a53dda0e6cdc482bd908430b Mon Sep 17 00:00:00 2001 From: Bryce Wilson Date: Fri, 12 Jan 2024 16:01:32 -0600 Subject: [PATCH 01/15] [X86] Use RORX over SHR imm --- llvm/lib/Target/X86/X86In

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

2024-01-25 Thread Bryce Wilson 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] [NVPTX][AMDGPU][CodeGen] Fix `local_space nullptr` handling for NVPTX and local/private `nullptr` value for AMDGPU. (PR #78759)

2024-01-25 Thread Matt Arsenault via cfe-commits
@@ -418,8 +418,10 @@ class LLVM_LIBRARY_VISIBILITY AMDGPUTargetInfo final : public TargetInfo { // value ~0. uint64_t getNullPointerValue(LangAS AS) const override { // FIXME: Also should handle region. -return (AS == LangAS::opencl_local || AS == LangAS::opencl_pr

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

2024-01-25 Thread via cfe-commits
https://github.com/NagyDonat updated https://github.com/llvm/llvm-project/pull/79446 >From 2a1bb37fef538ecfde67f10c50df07100cc3b69a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Don=C3=A1t=20Nagy?= Date: Thu, 25 Jan 2024 14:13:03 +0100 Subject: [PATCH 1/2] [analyzer] Avoid a crash in a debug printou

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

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

[clang] [NVPTX][AMDGPU][CodeGen] Fix `local_space nullptr` handling for NVPTX and local/private `nullptr` value for AMDGPU. (PR #78759)

2024-01-25 Thread Victor Lomuller via cfe-commits
@@ -285,6 +289,20 @@ void NVPTXTargetCodeGenInfo::addNVVMMetadata(llvm::GlobalValue *GV, bool NVPTXTargetCodeGenInfo::shouldEmitStaticExternCAliases() const { return false; } + +llvm::Constant * +NVPTXTargetCodeGenInfo::getNullPointer(const CodeGen::CodeGenModule &CGM, +

[clang] [NVPTX][AMDGPU][CodeGen] Fix `local_space nullptr` handling for NVPTX and local/private `nullptr` value for AMDGPU. (PR #78759)

2024-01-25 Thread Victor Lomuller via cfe-commits
@@ -418,8 +418,10 @@ class LLVM_LIBRARY_VISIBILITY AMDGPUTargetInfo final : public TargetInfo { // value ~0. uint64_t getNullPointerValue(LangAS AS) const override { // FIXME: Also should handle region. -return (AS == LangAS::opencl_local || AS == LangAS::opencl_pr

[clang] [LTO] Fix fat-lto output for -c -emit-llvm. (PR #79404)

2024-01-25 Thread Teresa Johnson via cfe-commits
https://github.com/teresajohnson approved this pull request. https://github.com/llvm/llvm-project/pull/79404 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] f1b1611 - [LTO] Fix fat-lto output for -c -emit-llvm. (#79404)

2024-01-25 Thread via cfe-commits
Author: Sean Fertile Date: 2024-01-25T10:50:59-05:00 New Revision: f1b1611148fa533fe198fec3fa4ef8139224dc80 URL: https://github.com/llvm/llvm-project/commit/f1b1611148fa533fe198fec3fa4ef8139224dc80 DIFF: https://github.com/llvm/llvm-project/commit/f1b1611148fa533fe198fec3fa4ef8139224dc80.diff

[clang] [LTO] Fix fat-lto output for -c -emit-llvm. (PR #79404)

2024-01-25 Thread Sean Fertile via cfe-commits
https://github.com/mandlebug closed https://github.com/llvm/llvm-project/pull/79404 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [LTO] Fix fat-lto output for -c -emit-llvm. (PR #79404)

2024-01-25 Thread Sean Fertile via cfe-commits
mandlebug wrote: Thanks for the review. https://github.com/llvm/llvm-project/pull/79404 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-01-25 Thread via cfe-commits
@@ -491,19 +491,41 @@ void VPlanTransforms::removeDeadRecipes(VPlan &Plan) { static VPValue *createScalarIVSteps(VPlan &Plan, const InductionDescriptor &ID, ScalarEvolution &SE, Instruction *TruncI, -Type

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

2024-01-25 Thread via cfe-commits
@@ -491,19 +491,41 @@ void VPlanTransforms::removeDeadRecipes(VPlan &Plan) { static VPValue *createScalarIVSteps(VPlan &Plan, const InductionDescriptor &ID, ScalarEvolution &SE, Instruction *TruncI, -Type

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

2024-01-25 Thread via cfe-commits
@@ -491,19 +491,41 @@ void VPlanTransforms::removeDeadRecipes(VPlan &Plan) { static VPValue *createScalarIVSteps(VPlan &Plan, const InductionDescriptor &ID, ScalarEvolution &SE, Instruction *TruncI, -Type

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

2024-01-25 Thread via cfe-commits
@@ -491,19 +491,41 @@ void VPlanTransforms::removeDeadRecipes(VPlan &Plan) { static VPValue *createScalarIVSteps(VPlan &Plan, const InductionDescriptor &ID, ScalarEvolution &SE, Instruction *TruncI, -Type

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

2024-01-25 Thread via cfe-commits
@@ -491,19 +491,41 @@ void VPlanTransforms::removeDeadRecipes(VPlan &Plan) { static VPValue *createScalarIVSteps(VPlan &Plan, const InductionDescriptor &ID, ScalarEvolution &SE, Instruction *TruncI, -Type

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

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

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

2024-01-25 Thread via cfe-commits
@@ -491,19 +491,41 @@ void VPlanTransforms::removeDeadRecipes(VPlan &Plan) { static VPValue *createScalarIVSteps(VPlan &Plan, const InductionDescriptor &ID, ScalarEvolution &SE, Instruction *TruncI, -Type

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

2024-01-25 Thread via cfe-commits
https://github.com/ayalz 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] [lldb] [libc] [libcxx] [libclc] [lld] [llvm] [flang] [clang-tools-extra] [libcxxabi] [compiler-rt] [VPlan] Add new VPScalarCastRecipe, use for IV & step trunc. (PR #78113)

2024-01-25 Thread via cfe-commits
@@ -491,19 +491,41 @@ void VPlanTransforms::removeDeadRecipes(VPlan &Plan) { static VPValue *createScalarIVSteps(VPlan &Plan, const InductionDescriptor &ID, ScalarEvolution &SE, Instruction *TruncI, -Type

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

2024-01-25 Thread via cfe-commits
https://github.com/ayalz commented: Looks good to me, adding some minor suggestions. 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

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

2024-01-25 Thread via cfe-commits
@@ -859,6 +859,7 @@ class VPSingleDefRecipe : public VPRecipeBase, public VPValue { case VPRecipeBase::VPWidenIntOrFpInductionSC: case VPRecipeBase::VPWidenPointerInductionSC: case VPRecipeBase::VPReductionPHISC: +case VPRecipeBase::VPScalarCastSC:

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

2024-01-25 Thread via cfe-commits
@@ -491,19 +491,41 @@ void VPlanTransforms::removeDeadRecipes(VPlan &Plan) { static VPValue *createScalarIVSteps(VPlan &Plan, const InductionDescriptor &ID, ScalarEvolution &SE, Instruction *TruncI, -Type

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

2024-01-25 Thread Amy Kwan via cfe-commits
https://github.com/amy-kwan approved this pull request. I don't have any further comments, so I think LGTM. https://github.com/llvm/llvm-project/pull/79109 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/l

[clang] 9b71393 - [analyzer] Avoid a crash in a debug printout function (#79446)

2024-01-25 Thread via cfe-commits
Author: NagyDonat Date: 2024-01-25T17:03:09+01:00 New Revision: 9b71393569ae4508d78b8a21993c21530bfdccc5 URL: https://github.com/llvm/llvm-project/commit/9b71393569ae4508d78b8a21993c21530bfdccc5 DIFF: https://github.com/llvm/llvm-project/commit/9b71393569ae4508d78b8a21993c21530bfdccc5.diff LOG

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

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

[clang-tools-extra] Apply format only if --format is specified (PR #79466)

2024-01-25 Thread Dmitry Polukhin via cfe-commits
https://github.com/dmpolukhin created https://github.com/llvm/llvm-project/pull/79466 clang-apply-replacements used to apply format even without --format is specified. This because, methods like createReplacementsForHeaders only takes the Spec.Style and would re-order the headers even when it

[clang-tools-extra] Apply format only if --format is specified (PR #79466)

2024-01-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Dmitry Polukhin (dmpolukhin) Changes clang-apply-replacements used to apply format even without --format is specified. This because, methods like createReplacementsForHeaders only takes the Spec.Style and would re-order the he

[clang] [clang][analyzer] Improve modeling of 'popen' and 'pclose' in StdLibraryFunctionsChecker (PR #78895)

2024-01-25 Thread Balázs Kéri via cfe-commits
@@ -2211,6 +2221,15 @@ void StdLibraryFunctionsChecker::initFunctionSummaries( ErrnoNEZeroIrrelevant, GenericFailureMsg) .ArgConstraint(NotNull(ArgNo(0; +// int pclose(FILE *stream); +addToFunctionSummaryMap( +"pclose", Signatu

[clang] [llvm] [clang-tools-extra] [analyzer] Support interestingness in ArrayBoundV2 (PR #78315)

2024-01-25 Thread via cfe-commits
=?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: https://github.com/NagyDonat updated https://github.com/llvm/llvm-project/pull/78315 >From c75c05c6e894a46797913c5bdccb2

[clang] [llvm] [RISCV] Add missing dependency check for Zvkb (PR #79467)

2024-01-25 Thread Brandon Wu via cfe-commits
https://github.com/4vtomat created https://github.com/llvm/llvm-project/pull/79467 None >From 61dd60b6172df5a73daa403d1fc5b5e39169df40 Mon Sep 17 00:00:00 2001 From: Brandon Wu Date: Thu, 25 Jan 2024 08:13:31 -0800 Subject: [PATCH] [RISCV] Add missing dependency check for Zvkb --- clang/test

[clang] [llvm] [RISCV] Add missing dependency check for Zvkb (PR #79467)

2024-01-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-llvm-support Author: Brandon Wu (4vtomat) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/79467.diff 2 Files Affected: - (modified) clang/test/Driver/riscv-toolchain-gcc-multilib-reuse.c (+1-1) - (modifie

[clang] [llvm] [clang-tools-extra] [analyzer] Support interestingness in ArrayBoundV2 (PR #78315)

2024-01-25 Thread via cfe-commits
=?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: @@ -318,17 +403,95 @@ static Messages getTaintMsgs(const SubRegion *Region, const char *OffsetName) {

[clang-tools-extra] [clang] [llvm] [analyzer] Support interestingness in ArrayBoundV2 (PR #78315)

2024-01-25 Thread via cfe-commits
=?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: https://github.com/NagyDonat edited https://github.com/llvm/llvm-project/pull/78315 _

[lldb] [compiler-rt] [clang-tools-extra] [clang] [libc] [libunwind] [lld] [libcxx] [flang] [mlir] [llvm] [ELF] Implement R_RISCV_TLSDESC for RISC-V (PR #79239)

2024-01-25 Thread Paul Kirth via cfe-commits
@@ -513,29 +547,125 @@ void RISCV::relocate(uint8_t *loc, const Relocation &rel, uint64_t val) const { break; case R_RISCV_RELAX: -return; // Ignored (for now) - +return; + case R_RISCV_TLSDESC: +// The addend is stored in the second word. +if (config->

[clang] [clang][analyzer] Improve modeling of 'popen' and 'pclose' in StdLibraryFunctionsChecker (PR #78895)

2024-01-25 Thread Balázs Kéri via cfe-commits
https://github.com/balazske approved this pull request. https://github.com/llvm/llvm-project/pull/78895 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Fix argument invalidations in StreamChecker. (PR #79470)

2024-01-25 Thread Balázs Kéri via cfe-commits
https://github.com/balazske created https://github.com/llvm/llvm-project/pull/79470 Specific arguments passed to stream handling functions are changed by the function, this means these should be invalidated ("escaped") by the analyzer. This change adds the argument invalidation (in specific ca

[clang] [clang][analyzer] Fix argument invalidations in StreamChecker. (PR #79470)

2024-01-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Balázs Kéri (balazske) Changes Specific arguments passed to stream handling functions are changed by the function, this means these should be invalidated ("escaped") by the analyzer. This change adds the argument invalidation (in specific

[clang] [clang][analyzer] Fix argument invalidations in StreamChecker. (PR #79470)

2024-01-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Balázs Kéri (balazske) Changes Specific arguments passed to stream handling functions are changed by the function, this means these should be invalidated ("escaped") by the analyzer. This change adds the argument invalid

[clang] [compiler-rt] [libc] [flang] [llvm] [clang-tools-extra] Apply kind code check on exitstat and cmdstat (PR #78286)

2024-01-25 Thread Yi Wu via cfe-commits
https://github.com/yi-wu-arm updated https://github.com/llvm/llvm-project/pull/78286 >From d56eca56c8e4c64e649febc43e2c48b6e5146680 Mon Sep 17 00:00:00 2001 From: Yi Wu Date: Tue, 16 Jan 2024 14:08:00 + Subject: [PATCH 1/9] change exitstat and cmsstat from AnyInt to DefaultInt --- flang/l

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

2024-01-25 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/78637 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [libc] [flang] [llvm] [clang-tools-extra] Apply kind code check on exitstat and cmdstat (PR #78286)

2024-01-25 Thread Yi Wu via cfe-commits
https://github.com/yi-wu-arm edited https://github.com/llvm/llvm-project/pull/78286 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AIX][TLS] Disallow the use of -maix-small-local-exec-tls and -fno-data-sections (PR #79252)

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

<    1   2   3   4   5   6   >