[clang] [Clang] Remove unnecessary Decl transform & profiles for SizeOfPackExpr (PR #124533)

2025-01-27 Thread Younan Zhang via cfe-commits
zyn0217 wrote: @shafik @AaronBallman Here is the complete backstory: We were not performing well in out-of-line concept comparison, especially for expressions involving packs. I tried to address these issues around commit 04d20b170, but it quickly became evident that the fix was insufficient f

[clang] 0cb7636 - [RISCV] Add MIPS extensions (#121394)

2025-01-27 Thread via cfe-commits
Author: Djordje Todorovic Date: 2025-01-28T08:04:09+01:00 New Revision: 0cb7636a462a8d4209e2b6344304eb43f02853eb URL: https://github.com/llvm/llvm-project/commit/0cb7636a462a8d4209e2b6344304eb43f02853eb DIFF: https://github.com/llvm/llvm-project/commit/0cb7636a462a8d4209e2b6344304eb43f02853eb.d

[clang] [Clang] call HandleImmediateInvocation before checking for immediate escacalating expressions (reland) (PR #124708)

2025-01-27 Thread via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/124708 >From fb5d3dafcc72e815ed7122dc33b4622a26c16cd8 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Sat, 25 Jan 2025 16:54:18 +0100 Subject: [PATCH 1/4] [Clang] call HandleImmediateInvocation before checking fo

[clang] [clang][ExprConst] Don't diagnose a non-existent init as not constant (PR #124575)

2025-01-27 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. https://github.com/llvm/llvm-project/pull/124575 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ExprConst] Don't diagnose a non-existent init as not constant (PR #124575)

2025-01-27 Thread via cfe-commits
cor3ntin wrote: Do we need a changelog here? I'm on the fence but it would not hurt https://github.com/llvm/llvm-project/pull/124575 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] call HandleImmediateInvocation before checking for immediate escacalating expressions (reland) (PR #124708)

2025-01-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: cor3ntin (cor3ntin) Changes HandleImmediateInvocation can call MarkExpressionAsImmediateEscalating and should always be called before CheckImmediateEscalatingFunctionDefinition. However, we were not doing that in `ActFunctionBody`. F

[clang] [clang-tools-extra] [flang] [clang] Extend diagnose_if to accept more detailed warning information, take 2 (PR #119712)

2025-01-27 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/119712 >From 0f1a11175bc7c3953e332159fe61192ad29e8c42 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Thu, 12 Dec 2024 11:35:49 +0100 Subject: [PATCH] [clang] Extend diagnose_if to accept more detailed warning

[clang] [llvm] [RISCV] Add MIPS extensions (PR #121394)

2025-01-27 Thread Djordje Todorovic via cfe-commits
https://github.com/djtodoro closed https://github.com/llvm/llvm-project/pull/121394 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] call HandleImmediateInvocation before checking for immediate escacalating expressions (reland) (PR #124708)

2025-01-27 Thread via cfe-commits
cor3ntin wrote: Much better https://llvm-compile-time-tracker.com/compare_clang.php?from=0e372c3ea31da276ac67c5972e4ef63514577e9c&to=f58459d08ac3eae3b1c77fb4808da60b6e5bb7ec&stat=instructions%3Au&sortBy=interestingness https://github.com/llvm/llvm-project/pull/124708 ___

[clang] [Clang] call HandleImmediateInvocation before checking for immediate escacalating expressions (reland) (PR #124708)

2025-01-27 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 0e372c3ea31da276ac67c5972e4ef63514577e9c f58459d08ac3eae3b1c77fb4808da60b6e5bb7ec --e

[clang] [Clang] call HandleImmediateInvocation before checking for immediate escacalating expressions (reland) (PR #124708)

2025-01-27 Thread via cfe-commits
https://github.com/cor3ntin created https://github.com/llvm/llvm-project/pull/124708 HandleImmediateInvocation can call MarkExpressionAsImmediateEscalating and should always be called before CheckImmediateEscalatingFunctionDefinition. However, we were not doing that in `ActFunctionBody`.

[clang] [llvm] [RISCV] Add Qualcomm uC Xqcilia (Large Immediate Arithmetic) extension (PR #124706)

2025-01-27 Thread Craig Topper via cfe-commits
@@ -1046,6 +1046,20 @@ struct RISCVOperand final : public MCParsedAsmOperand { isInt<26>(fixImmediateForRV32(Imm, isRV64Imm())); } + bool isImm32() const { +int64_t Imm; +RISCVMCExpr::VariantKind VK = RISCVMCExpr::VK_RISCV_None; +if (!isImm()) +

[clang] [llvm] [RISCV] Add Qualcomm uC Xqcilia (Large Immediate Arithmetic) extension (PR #124706)

2025-01-27 Thread Craig Topper via cfe-commits
@@ -245,6 +260,25 @@ class QCIRVInstESStore funct3, bits<2> funct2, string opcodestr> (ins GPRMem:$rs2, GPR:$rs1, simm26:$imm), opcodestr, "$rs2, ${imm}(${rs1})">; +class QCIRVInstEAI funct3, bits<1> funct1, string opcodestr> +:

[clang] [llvm] [RISCV] Add Qualcomm uC Xqcilia (Large Immediate Arithmetic) extension (PR #124706)

2025-01-27 Thread Craig Topper via cfe-commits
@@ -34,6 +34,21 @@ def uimm11 : RISCVUImmLeafOp<11>; def simm26 : RISCVSImmLeafOp<26>; +// 32-bit Immediate, used by RV32 Instructions in 32-bit operations, so no +// sign-/zero-extension. This is represented internally as a signed 32-bit value. +def imm32 : RISCVOp { + let

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2025-01-27 Thread via cfe-commits
https://github.com/leijurv updated https://github.com/llvm/llvm-project/pull/118046 >From 1caf823165b16f6701993d586df51d5cdbf0885e Mon Sep 17 00:00:00 2001 From: Leijurv Date: Fri, 29 Nov 2024 21:54:36 -0600 Subject: [PATCH 01/13] [clang-format] Add BreakBeforeTemplateClose option --- clang/d

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2025-01-27 Thread via cfe-commits
https://github.com/leijurv edited https://github.com/llvm/llvm-project/pull/118046 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Add Qualcomm uC Xqcilia (Large Immediate Arithmetic) extension (PR #124706)

2025-01-27 Thread via cfe-commits
https://github.com/hchandel updated https://github.com/llvm/llvm-project/pull/124706 >From 81d1b6240cfaedb521d4f0efd54744114577f455 Mon Sep 17 00:00:00 2001 From: Harsh Chandel Date: Fri, 24 Jan 2025 16:43:12 +0530 Subject: [PATCH 1/3] [RISCV] Add Qualcomm uC Xqcilia (Large Immediate Arithmeti

[clang] [Driver][ASan] Refactor Clang-Driver "Sanitizer Bitcode" linking. (PR #123922)

2025-01-27 Thread Amit Kumar Pandey via cfe-commits
https://github.com/ampandey-1995 updated https://github.com/llvm/llvm-project/pull/123922 >From 5ec4303eb089038db1965b844b8b3bec136207bf Mon Sep 17 00:00:00 2001 From: Amit Pandey Date: Wed, 22 Jan 2025 15:41:41 +0530 Subject: [PATCH] [Driver][ASan] Refactor Clang-Driver "Sanitizer Bitcode" li

[clang] [clang][Sema] Generalize HeuristicResolver::resolveTypeToRecordDecl() to resolveTypeToTagDecl() (PR #124699)

2025-01-27 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/124699 >From 24eab93061adf9a241a0b0b418ea0750e2b66b9d Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Mon, 27 Jan 2025 01:22:31 -0500 Subject: [PATCH] [clang][Sema] Generalize HeuristicResolver::resolveTypeTo

[clang] [clang] Fix heap-use-after-free in TryAnnotateTypeOrScopeTokenAfterScopeSpec (PR #124521)

2025-01-27 Thread via cfe-commits
Shivam7-1 wrote: > You need to add a test. We have ASan buildbots, but they only run post-merge. > You can use `LLVM_USE_SANITIZER` [CMake > option](https://llvm.org/docs/CMake.html#:~:text=llvm_use_sanitizer%3Astring) > to check locally that Clang crashes on your test without the fix. Hii @E

[clang] [clang][Sema] Generalize HeuristicResolver::resolveTypeToRecordDecl() to resolveTypeToTagDecl() (PR #124699)

2025-01-27 Thread Younan Zhang via cfe-commits
@@ -389,11 +390,11 @@ bool findOrdinaryMember(const CXXRecordDecl *RD, CXXBasePath &Path, bool HeuristicResolverImpl::findOrdinaryMemberInDependentClasses( const CXXBaseSpecifier *Specifier, CXXBasePath &Path, DeclarationName Name) { - CXXRecordDecl *RD = - resol

[clang] [clang][Sema] Generalize HeuristicResolver::resolveTypeToRecordDecl() to resolveTypeToTagDecl() (PR #124699)

2025-01-27 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 approved this pull request. One nit, else LGTM https://github.com/llvm/llvm-project/pull/124699 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Generalize HeuristicResolver::resolveTypeToRecordDecl() to resolveTypeToTagDecl() (PR #124699)

2025-01-27 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 edited https://github.com/llvm/llvm-project/pull/124699 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2025-01-27 Thread via cfe-commits
https://github.com/leijurv edited https://github.com/llvm/llvm-project/pull/118046 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][P1061] Add stuctured binding packs (PR #121417)

2025-01-27 Thread Jason Rice via cfe-commits
@@ -1523,9 +1570,25 @@ void Sema::CheckCompleteDecompositionDeclaration(DecompositionDecl *DD) { // If the type of the decomposition is dependent, then so is the type of // each binding. if (DecompType->isDependentType()) { -for (auto *B : DD->bindings()) - B->s

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2025-01-27 Thread via cfe-commits
https://github.com/leijurv updated https://github.com/llvm/llvm-project/pull/118046 >From 1caf823165b16f6701993d586df51d5cdbf0885e Mon Sep 17 00:00:00 2001 From: Leijurv Date: Fri, 29 Nov 2024 21:54:36 -0600 Subject: [PATCH 01/13] [clang-format] Add BreakBeforeTemplateClose option --- clang/d

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2025-01-27 Thread via cfe-commits
@@ -11220,6 +11220,333 @@ TEST_F(FormatTest, WrapsTemplateDeclarationsWithComments) { Style); } +TEST_F(FormatTest, BreakBeforeTemplateCloser) { + FormatStyle Style = getGoogleStyle(FormatStyle::LK_Cpp); + // Begin with tests covering the case where there is no constr

[clang] [Clang][P1061] Add stuctured binding packs (PR #121417)

2025-01-27 Thread Jason Rice via cfe-commits
@@ -3423,6 +3425,13 @@ VarDecl *BindingDecl::getHoldingVar() const { return VD; } +llvm::ArrayRef BindingDecl::getBindingPackExprs() const { + if (!Binding) +return {}; ricejasonf wrote: Added. The assert was being triggered in one spot that I realized

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2025-01-27 Thread via cfe-commits
@@ -11220,6 +11220,333 @@ TEST_F(FormatTest, WrapsTemplateDeclarationsWithComments) { Style); } +TEST_F(FormatTest, BreakBeforeTemplateCloser) { + FormatStyle Style = getGoogleStyle(FormatStyle::LK_Cpp); + // Begin with tests covering the case where there is no constr

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2025-01-27 Thread via cfe-commits
https://github.com/leijurv updated https://github.com/llvm/llvm-project/pull/118046 >From 1caf823165b16f6701993d586df51d5cdbf0885e Mon Sep 17 00:00:00 2001 From: Leijurv Date: Fri, 29 Nov 2024 21:54:36 -0600 Subject: [PATCH 01/13] [clang-format] Add BreakBeforeTemplateClose option --- clang/d

[clang] [PGO] Add a clang option -fprofile-continuous that enables PGO continuous mode (PR #124353)

2025-01-27 Thread Wael Yehia via cfe-commits
@@ -0,0 +1,16 @@ +// RUN: %clang %s -S -emit-llvm -fprofile-generate -fprofile-continuous -o - | FileCheck %s --check-prefix=IRPGO w2yehia wrote: In this test, I'm testing both the driver (lines 4,5,8) and the clang codegen (lines 1,2,3,6). Should I split it in

[clang] [analyzer] Widen loops: Augment assignment note when values invalidated at the start of a loop (PR #122398)

2025-01-27 Thread via cfe-commits
dgg5503 wrote: Hi @steakhal , Thanks for providing such detailed answers to my questions! Given your response, I feel like the design of my implementation is on the right track, although feel free to critique it further when you have the chance. One thing I do need to look further into is app

[clang] [Sema] Migrate away from PointerUnion::dyn_cast (NFC) (PR #124675)

2025-01-27 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 approved this pull request. https://github.com/llvm/llvm-project/pull/124675 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL][SPIRV][DXIL] Implement `WaveActiveMax` intrinsic (PR #123428)

2025-01-27 Thread Adam Yang via cfe-commits
https://github.com/adam-yang updated https://github.com/llvm/llvm-project/pull/123428 >From cedd93faaa75c343fda7a21ecf813249cf08609a Mon Sep 17 00:00:00 2001 From: Adam Yang <31109344+adam-y...@users.noreply.github.com> Date: Fri, 17 Jan 2025 16:14:44 -0800 Subject: [PATCH 1/6] Added WaveActiveM

[clang] [clang] disallow narrowing when matching template template parameters (PR #124313)

2025-01-27 Thread Matheus Izvekov via cfe-commits
@@ -11682,6 +11683,7 @@ class Sema final : public SemaBase { SmallVectorImpl &SugaredConverted, SmallVectorImpl &CanonicalConverted, CheckTemplateArgumentKind CTAK, bool PartialOrdering, +

[clang] [llvm] [ubsan] Parse and use in LowerAllowCheckPass (PR #124211)

2025-01-27 Thread Thurston Dang via cfe-commits
thurstond wrote: > Lets move clang part into a new PR? I've removed the clang part. Separate PR coming soon (tm). https://github.com/llvm/llvm-project/pull/124211 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/m

[clang] [llvm] [ubsan] Parse and use in LowerAllowCheckPass (PR #124211)

2025-01-27 Thread Vitaly Buka via cfe-commits
@@ -2314,7 +2314,6 @@ bool CompilerInvocation::ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, Opts.SanitizeSkipHotCutoffs = parseSanitizerWeightedKinds( "-fsanitize-skip-hot-cutoff=", Args.getAllArgValues(OPT_fsanitize_skip_hot_cutoff_EQ), Diags); - --

[clang] [llvm] [ubsan] Parse and use in LowerAllowCheckPass (PR #124211)

2025-01-27 Thread Thurston Dang via cfe-commits
https://github.com/thurstond updated https://github.com/llvm/llvm-project/pull/124211 >From 5d1944f522152a7356d8e8147d3b3c5939c32526 Mon Sep 17 00:00:00 2001 From: Thurston Dang Date: Wed, 22 Jan 2025 18:59:07 + Subject: [PATCH 1/6] [ubsan] Plumb through -fsanitize-skip-hot-cutoff to Lower

[clang] [llvm] [ubsan] Parse and use in LowerAllowCheckPass (PR #124211)

2025-01-27 Thread Thurston Dang via cfe-commits
@@ -2314,7 +2314,6 @@ bool CompilerInvocation::ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, Opts.SanitizeSkipHotCutoffs = parseSanitizerWeightedKinds( "-fsanitize-skip-hot-cutoff=", Args.getAllArgValues(OPT_fsanitize_skip_hot_cutoff_EQ), Diags); - --

[clang] [llvm] [ubsan] Parse and use in LowerAllowCheckPass (PR #124211)

2025-01-27 Thread Vitaly Buka via cfe-commits
@@ -71,7 +72,8 @@ static void emitRemark(IntrinsicInst *II, OptimizationRemarkEmitter &ORE, static bool removeUbsanTraps(Function &F, const BlockFrequencyInfo &BFI, const ProfileSummaryInfo *PSI, - OptimizationRemarkEmi

[clang] [AMDGPU] Use the AMDGPUToolChain when targeting C/C++ directly (PR #99687)

2025-01-27 Thread Alex Voicu via cfe-commits
AlexVlx wrote: > > It is six months old, but it is relatively difficult to keep track of all > > the concurrent non-communicating swimlanes - I do apologise for not having > > done so though! It is possible that we are microfocusing on a potential use > > case, but there are other valid ones.

[clang] [llvm] [ubsan] Parse and use in LowerAllowCheckPass (PR #124211)

2025-01-27 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka approved this pull request. https://github.com/llvm/llvm-project/pull/124211 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [ubsan] Parse and use in LowerAllowCheckPass (PR #124211)

2025-01-27 Thread Vitaly Buka via cfe-commits
@@ -828,11 +828,66 @@ parseLowerAllowCheckPassOptions(StringRef Params) { StringRef ParamName; std::tie(ParamName, Params) = Params.split(';'); -return make_error( -formatv("invalid LowerAllowCheck pass parameter '{0}' ", ParamName) -.str(), -

[clang] [llvm] [ubsan] Parse and use in LowerAllowCheckPass (PR #124211)

2025-01-27 Thread Vitaly Buka via cfe-commits
@@ -2,6 +2,14 @@ ; RUN: opt < %s -passes='function(lower-allow-check)' -S | FileCheck %s --check-prefixes=NOPROFILE ; RUN: opt < %s -passes='function(lower-allow-check)' -lower-allow-check-random-rate=0 -S | FileCheck %s --check-prefixes=NONE ; RUN: opt < %s -passes='function

[clang] [AMDGPU] Use the AMDGPUToolChain when targeting C/C++ directly (PR #99687)

2025-01-27 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > It is six months old, but it is relatively difficult to keep track of all the > concurrent non-communicating swimlanes - I do apologise for not having done > so though! It is possible that we are microfocusing on a potential use case, > but there are other valid ones. For exam

[clang] [llvm] [ubsan] Parse and use in LowerAllowCheckPass (PR #124211)

2025-01-27 Thread Thurston Dang via cfe-commits
https://github.com/thurstond updated https://github.com/llvm/llvm-project/pull/124211 >From 5d1944f522152a7356d8e8147d3b3c5939c32526 Mon Sep 17 00:00:00 2001 From: Thurston Dang Date: Wed, 22 Jan 2025 18:59:07 + Subject: [PATCH 1/5] [ubsan] Plumb through -fsanitize-skip-hot-cutoff to Lower

[clang] 194c74e - [clang][Sema] Null-check type in resolveMemberExpr() before checking for auto type (#124628)

2025-01-27 Thread via cfe-commits
Author: Nathan Ridge Date: 2025-01-27T19:51:30-05:00 New Revision: 194c74e0166876ef2c5e0ff5e98a4b5a5442138c URL: https://github.com/llvm/llvm-project/commit/194c74e0166876ef2c5e0ff5e98a4b5a5442138c DIFF: https://github.com/llvm/llvm-project/commit/194c74e0166876ef2c5e0ff5e98a4b5a5442138c.diff

[clang] [llvm] [ubsan] Parse and use in LowerAllowCheckPass (PR #124211)

2025-01-27 Thread Thurston Dang via cfe-commits
https://github.com/thurstond updated https://github.com/llvm/llvm-project/pull/124211 >From 5d1944f522152a7356d8e8147d3b3c5939c32526 Mon Sep 17 00:00:00 2001 From: Thurston Dang Date: Wed, 22 Jan 2025 18:59:07 + Subject: [PATCH 1/7] [ubsan] Plumb through -fsanitize-skip-hot-cutoff to Lower

[clang] [llvm] [ubsan] Parse and use in LowerAllowCheckPass (PR #124211)

2025-01-27 Thread Vitaly Buka via cfe-commits
@@ -828,11 +828,66 @@ parseLowerAllowCheckPassOptions(StringRef Params) { StringRef ParamName; std::tie(ParamName, Params) = Params.split(';'); -return make_error( -formatv("invalid LowerAllowCheck pass parameter '{0}' ", ParamName) -.str(), -

[clang] [CIR] Add framework for CIR to LLVM IR lowering (PR #124650)

2025-01-27 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor updated https://github.com/llvm/llvm-project/pull/124650 >From 41546e2d096310d8a1474539b5036152c7df3d11 Mon Sep 17 00:00:00 2001 From: Andy Kaylor Date: Mon, 27 Jan 2025 14:54:10 -0800 Subject: [PATCH 1/2] [CIR] Add framework for CIR to LLVM IR lowering Create the

[clang] [llvm] [ubsan] Parse and use in LowerAllowCheckPass (PR #124211)

2025-01-27 Thread Thurston Dang via cfe-commits
@@ -2,6 +2,14 @@ ; RUN: opt < %s -passes='function(lower-allow-check)' -S | FileCheck %s --check-prefixes=NOPROFILE ; RUN: opt < %s -passes='function(lower-allow-check)' -lower-allow-check-random-rate=0 -S | FileCheck %s --check-prefixes=NONE ; RUN: opt < %s -passes='function

[clang] [llvm] [ubsan] Parse and use in LowerAllowCheckPass (PR #124211)

2025-01-27 Thread Thurston Dang via cfe-commits
@@ -107,7 +108,18 @@ static bool removeUbsanTraps(Function &F, const BlockFrequencyInfo &BFI, case Intrinsic::allow_runtime_check: { ++NumChecksTotal; -bool ToRemove = ShouldRemove(BB); +bool ToRemove = ShouldRemoveRandom(); + +unsigned i

[clang] [llvm] [ubsan] Parse and use in LowerAllowCheckPass (PR #124211)

2025-01-27 Thread Thurston Dang via cfe-commits
@@ -107,7 +108,18 @@ static bool removeUbsanTraps(Function &F, const BlockFrequencyInfo &BFI, case Intrinsic::allow_runtime_check: { ++NumChecksTotal; -bool ToRemove = ShouldRemove(BB); +bool ToRemove = ShouldRemoveRandom(); + +unsigned i

[clang] [llvm] [ubsan] Parse and use in LowerAllowCheckPass (PR #124211)

2025-01-27 Thread Thurston Dang via cfe-commits
@@ -81,21 +83,20 @@ static bool removeUbsanTraps(Function &F, const BlockFrequencyInfo &BFI, return *Rng; }; - auto ShouldRemoveHot = [&](const BasicBlock &BB) { -return HotPercentileCutoff.getNumOccurrences() && PSI && - PSI->isHotCountNthPercentile( -

[clang] [llvm] [ubsan] Parse and use in LowerAllowCheckPass (PR #124211)

2025-01-27 Thread Thurston Dang via cfe-commits
@@ -81,21 +83,20 @@ static bool removeUbsanTraps(Function &F, const BlockFrequencyInfo &BFI, return *Rng; }; - auto ShouldRemoveHot = [&](const BasicBlock &BB) { -return HotPercentileCutoff.getNumOccurrences() && PSI && - PSI->isHotCountNthPercentile( -

[clang] [llvm] [ubsan] Parse and use in LowerAllowCheckPass (PR #124211)

2025-01-27 Thread Thurston Dang via cfe-commits
@@ -71,7 +72,8 @@ static void emitRemark(IntrinsicInst *II, OptimizationRemarkEmitter &ORE, static bool removeUbsanTraps(Function &F, const BlockFrequencyInfo &BFI, const ProfileSummaryInfo *PSI, - OptimizationRemarkEmi

[clang] [llvm] [ubsan] Parse and use in LowerAllowCheckPass (PR #124211)

2025-01-27 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 ec15b242505a46ea7d195a6520fb869a80a2cd10 7b6b0166835faff53665321342b47b0887ee99a6 --e

[clang] [llvm] [ubsan] Parse and use in LowerAllowCheckPass (PR #124211)

2025-01-27 Thread Thurston Dang via cfe-commits
@@ -108,14 +108,17 @@ static Value *getBoundsCheckCond(Value *Ptr, Value *InstVal, return Or; } -static CallInst *InsertTrap(BuilderTy &IRB, bool DebugTrapBB) { +static CallInst *InsertTrap(BuilderTy &IRB, bool DebugTrapBB, thurstond wrote: Done (https://g

[clang] [llvm] [ubsan] Parse and use in LowerAllowCheckPass (PR #124211)

2025-01-27 Thread Thurston Dang via cfe-commits
https://github.com/thurstond edited https://github.com/llvm/llvm-project/pull/124211 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Null-check type in resolveMemberExpr() before checking for auto type (PR #124628)

2025-01-27 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 closed https://github.com/llvm/llvm-project/pull/124628 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Revert "[Clang] __has_builtin should return false for aux triple builtins (#121839) (PR #124626)

2025-01-27 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `openmp-offload-libc-amdgpu-runtime` running on `omp-vega20-1` while building `clang` at step 7 "Add check check-offload". Full details are available at: https://lab.llvm.org/buildbot/#/builders/73/builds/12525 Here is the r

[clang] [llvm] [ubsan] Parse and use in LowerAllowCheckPass (PR #124211)

2025-01-27 Thread Thurston Dang via cfe-commits
https://github.com/thurstond edited https://github.com/llvm/llvm-project/pull/124211 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [ubsan] Plumb through -fsanitize-skip-hot-cutoff to LowerAllowCheckPass (PR #124211)

2025-01-27 Thread Thurston Dang via cfe-commits
https://github.com/thurstond updated https://github.com/llvm/llvm-project/pull/124211 >From 5d1944f522152a7356d8e8147d3b3c5939c32526 Mon Sep 17 00:00:00 2001 From: Thurston Dang Date: Wed, 22 Jan 2025 18:59:07 + Subject: [PATCH 1/4] [ubsan] Plumb through -fsanitize-skip-hot-cutoff to Lower

[clang] [Clang] Link libgcc_s.1.dylib when building for macOS 10.5 and older (PR #124651)

2025-01-27 Thread via cfe-commits
https://github.com/Un1q32 updated https://github.com/llvm/llvm-project/pull/124651 >From d4e97c4113086c3d2dfa3bf6e9ecfee377f8c4b6 Mon Sep 17 00:00:00 2001 From: Un1q32 Date: Mon, 27 Jan 2025 18:00:34 -0500 Subject: [PATCH 1/2] [Clang] Link libgcc_s.1.dylib when building for macOS 10.5 and olde

[clang] [clang] Track source deduction guide for alias template deduction guides (PR #123875)

2025-01-27 Thread via cfe-commits
https://github.com/antangelo closed https://github.com/llvm/llvm-project/pull/123875 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] f94c481 - [clang] Track source deduction guide for alias template deduction guides (#123875)

2025-01-27 Thread via cfe-commits
Author: antangelo Date: 2025-01-27T18:59:12-05:00 New Revision: f94c481543bdd3b11a668ad78d46593cf974788f URL: https://github.com/llvm/llvm-project/commit/f94c481543bdd3b11a668ad78d46593cf974788f DIFF: https://github.com/llvm/llvm-project/commit/f94c481543bdd3b11a668ad78d46593cf974788f.diff LOG

[clang] [PGO] Add a clang option -fprofile-continuous that enables PGO continuous mode (PR #124353)

2025-01-27 Thread Wael Yehia via cfe-commits
https://github.com/w2yehia edited https://github.com/llvm/llvm-project/pull/124353 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Add framework for CIR to LLVM IR lowering (PR #124650)

2025-01-27 Thread Nathan Lanza via cfe-commits
@@ -0,0 +1,41 @@ +//- LowerToLLVM.cpp - Lowering from CIR to LLVMIR -===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang] [CIR] Add framework for CIR to LLVM IR lowering (PR #124650)

2025-01-27 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. Seems like there are some CI failures (format related?) but LGTM once those are fixed https://github.com/llvm/llvm-project/pull/124650 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang-cl]: generate debug info when `novtable` is specified (PR #124643)

2025-01-27 Thread David Blaikie via cfe-commits
https://github.com/dwblaikie approved this pull request. Looks great - thanks! https://github.com/llvm/llvm-project/pull/124643 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Link libgcc_s.1.dylib when building for macOS 10.5 and older (PR #124651)

2025-01-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (Un1q32) Changes There are a lot of symbols that the compiler expects to be in libSystem that were only in libgcc_s before 10.6, like libunwind things and some builtins on i386. We already do this for iOS versions < 5.0 for the same

[clang] [Clang] Link libgcc_s.1.dylib when building for macOS 10.5 and older (PR #124651)

2025-01-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: None (Un1q32) Changes There are a lot of symbols that the compiler expects to be in libSystem that were only in libgcc_s before 10.6, like libunwind things and some builtins on i386. We already do this for iOS versions < 5.0 for t

[clang] [Clang] Link libgcc_s.1.dylib when building for macOS 10.5 and older (PR #124651)

2025-01-27 Thread via cfe-commits
https://github.com/Un1q32 created https://github.com/llvm/llvm-project/pull/124651 There are a lot of symbols that the compiler expects to be in libSystem that were only in libgcc_s before 10.6, like libunwind things and some builtins on i386. We already do this for iOS versions < 5.0 for the

[clang] [CIR] Add framework for CIR to LLVM IR lowering (PR #124650)

2025-01-27 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 3861b9db882d5637725ceeccb801c2bb837e8fc5 41546e2d096310d8a1474539b5036152c7df3d11 --e

[clang] [CIR] Add framework for CIR to LLVM IR lowering (PR #124650)

2025-01-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Andy Kaylor (andykaylor) Changes Create the skeleton framework for lowering from ClangIR to LLVM IR. This initial implementation just creates an empty LLVM IR module. Actual lowering of even minimal ClangIR is deferred to a later patch.

[clang] [CIR] Add framework for CIR to LLVM IR lowering (PR #124650)

2025-01-27 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor created https://github.com/llvm/llvm-project/pull/124650 Create the skeleton framework for lowering from ClangIR to LLVM IR. This initial implementation just creates an empty LLVM IR module. Actual lowering of even minimal ClangIR is deferred to a later patch. >F

[clang] [llvm] [StrTable] Switch intrinsics to StringTable and work around MSVC (PR #123548)

2025-01-27 Thread Reid Kleckner via cfe-commits
https://github.com/rnk approved this pull request. https://github.com/llvm/llvm-project/pull/123548 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [StrTable] Switch intrinsics to StringTable and work around MSVC (PR #123548)

2025-01-27 Thread Reid Kleckner via cfe-commits
@@ -51,28 +57,71 @@ class StringToOffsetTable { return II->second; } - // Emit the string using string literal concatenation, for better readability - // and searchability. - void EmitStringLiteralDef(raw_ostream &OS, const Twine &Decl, -co

[clang] 0e372c3 - Revert "[Clang] call HandleImmediateInvocation before checking for immediate escacalating expressions" (#124646)

2025-01-27 Thread via cfe-commits
Author: cor3ntin Date: 2025-01-27T23:51:19+01:00 New Revision: 0e372c3ea31da276ac67c5972e4ef63514577e9c URL: https://github.com/llvm/llvm-project/commit/0e372c3ea31da276ac67c5972e4ef63514577e9c DIFF: https://github.com/llvm/llvm-project/commit/0e372c3ea31da276ac67c5972e4ef63514577e9c.diff LOG:

[clang] [Clang] call HandleImmediateInvocation before checking for immediate escacalating expressions (PR #124414)

2025-01-27 Thread via cfe-commits
cor3ntin wrote: > FYI this one seems like a fairly substantial compile-time regression for C++ > code: > https://llvm-compile-time-tracker.com/compare_clang.php?from=ad9da92cf6f735747ef04fd56937e1d76819e503&to=5815a311050ae218ebcda53adeee24ed96851943&stat=instructions%3Au&sortBy=interestingness

[clang] Revert "[Clang] call HandleImmediateInvocation before checking for immediate escacalating expressions" (PR #124646)

2025-01-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: cor3ntin (cor3ntin) Changes Reverts llvm/llvm-project#124414 Turns out to be an important compile time regression, I'll come up with a less disruptive approach --- Full diff: https://github.com/llvm/llvm-project/pull/124646.diff 6 File

[clang] Revert "[Clang] call HandleImmediateInvocation before checking for immediate escacalating expressions" (PR #124646)

2025-01-27 Thread via cfe-commits
https://github.com/cor3ntin closed https://github.com/llvm/llvm-project/pull/124646 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Revert "[Clang] call HandleImmediateInvocation before checking for immediate escacalating expressions" (PR #124646)

2025-01-27 Thread via cfe-commits
https://github.com/cor3ntin created https://github.com/llvm/llvm-project/pull/124646 Reverts llvm/llvm-project#124414 Turns out to be an important compile time regression, I'll come up with a less disruptive approach >From 6660401456710db91998bbfe60f070a8f05edabe Mon Sep 17 00:00:00 2001 From

[clang] [Clang] call HandleImmediateInvocation before checking for immediate escacalating expressions (PR #124414)

2025-01-27 Thread Nikita Popov via cfe-commits
nikic wrote: FYI this one seems like a fairly substantial compile-time regression for C++ code: https://llvm-compile-time-tracker.com/compare_clang.php?from=ad9da92cf6f735747ef04fd56937e1d76819e503&to=5815a311050ae218ebcda53adeee24ed96851943&stat=instructions%3Au&sortBy=interestingness https:/

[clang] Revert "[Clang] __has_builtin should return false for aux triple builtins (#121839) (PR #124626)

2025-01-27 Thread Artem Belevich via cfe-commits
https://github.com/Artem-B approved this pull request. https://github.com/llvm/llvm-project/pull/124626 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix parsing attrs in class/struct (PR #124634)

2025-01-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Gedare Bloom (gedare) Changes An attribute in a class/struct declaration confuses the parser to treat the identifier following the attribute as a function or variable name. Fixes #124574 --- Full diff: https://github.com/llvm/llvm

[clang] [clang-format] Fix parsing attrs in class/struct (PR #124634)

2025-01-27 Thread Gedare Bloom via cfe-commits
https://github.com/gedare created https://github.com/llvm/llvm-project/pull/124634 An attribute in a class/struct declaration confuses the parser to treat the identifier following the attribute as a function or variable name. Fixes #124574 >From db6e09dca9d39b1c21543a069e7a1d1bf3997c0c Mon Se

[clang] [clang] Implement __attribute__((format_matches)) (PR #116708)

2025-01-27 Thread Shafik Yaghmour via cfe-commits
=?utf-8?q?Félix?= Cloutier , =?utf-8?q?Félix?= Cloutier , =?utf-8?q?Félix?= Cloutier , =?utf-8?q?Félix?= Cloutier Message-ID: In-Reply-To: @@ -10134,6 +10137,24 @@ def note_format_fix_specifier : Note<"did you mean to use '%0'?">; def note_printf_c_str: Note<"did you mean to

[clang] [clang] Implement __attribute__((format_matches)) (PR #116708)

2025-01-27 Thread Shafik Yaghmour via cfe-commits
=?utf-8?q?Félix?= Cloutier , =?utf-8?q?Félix?= Cloutier , =?utf-8?q?Félix?= Cloutier , =?utf-8?q?Félix?= Cloutier Message-ID: In-Reply-To: @@ -10134,6 +10137,24 @@ def note_format_fix_specifier : Note<"did you mean to use '%0'?">; def note_printf_c_str: Note<"did you mean to

[clang] [clang] Implement __attribute__((format_matches)) (PR #116708)

2025-01-27 Thread Shafik Yaghmour via cfe-commits
=?utf-8?q?Félix?= Cloutier , =?utf-8?q?Félix?= Cloutier , =?utf-8?q?Félix?= Cloutier , =?utf-8?q?Félix?= Cloutier Message-ID: In-Reply-To: @@ -10134,6 +10137,24 @@ def note_format_fix_specifier : Note<"did you mean to use '%0'?">; def note_printf_c_str: Note<"did you mean to

[clang] [clang] Implement __attribute__((format_matches)) (PR #116708)

2025-01-27 Thread Shafik Yaghmour via cfe-commits
=?utf-8?q?Félix?= Cloutier , =?utf-8?q?Félix?= Cloutier , =?utf-8?q?Félix?= Cloutier , =?utf-8?q?Félix?= Cloutier Message-ID: In-Reply-To: https://github.com/shafik edited https://github.com/llvm/llvm-project/pull/116708 ___ cfe-commits mailing list

[clang] [clang] Implement __attribute__((format_matches)) (PR #116708)

2025-01-27 Thread Shafik Yaghmour via cfe-commits
=?utf-8?q?Félix?= Cloutier , =?utf-8?q?Félix?= Cloutier , =?utf-8?q?Félix?= Cloutier , =?utf-8?q?Félix?= Cloutier Message-ID: In-Reply-To: https://github.com/shafik commented: Apologies if I somehow missed it but it looks like we are not really covering the diagnostics fully and we need to in

[compiler-rt] [libunwind] Reapply "[Fuchsia][cmake] Allow using FatLTO when building runtimes" (#119252) (PR #121820)

2025-01-27 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi closed https://github.com/llvm/llvm-project/pull/121820 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 6578790 - Reapply "[Fuchsia][cmake] Allow using FatLTO when building runtimes" (#119252) (#121820)

2025-01-27 Thread via cfe-commits
Author: Paul Kirth Date: 2025-01-27T13:44:18-08:00 New Revision: 6578790076fed5467bf613e48f7a0ad2f50f041a URL: https://github.com/llvm/llvm-project/commit/6578790076fed5467bf613e48f7a0ad2f50f041a DIFF: https://github.com/llvm/llvm-project/commit/6578790076fed5467bf613e48f7a0ad2f50f041a.diff LO

[compiler-rt] [libunwind] Reapply "[Fuchsia][cmake] Allow using FatLTO when building runtimes" (#119252) (PR #121820)

2025-01-27 Thread via cfe-commits
https://github.com/zeroomega approved this pull request. https://github.com/llvm/llvm-project/pull/121820 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][SME] Emit error for OpenMP captured regions in SME functions (PR #124590)

2025-01-27 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic approved this pull request. LGTM In theory, handling streaming mode doesn't seem too challenging here: you mark the outlined functions locally_streaming, and you're done, I think. That said, I'm not sure how you define the semantics for ZA, so maybe better to

[clang] [clang] Prevent duplicated instantiation of enumerators of unscoped member enumerations (PR #124407)

2025-01-27 Thread Shafik Yaghmour via cfe-commits
=?utf-8?q?André?= Brand , =?utf-8?q?André?= Brand Message-ID: In-Reply-To: shafik wrote: > @cor3ntin Thanks! I just added some details to the GitHub description. I hope > it's not too verbose. And I rebased the branch to resolve the conflict in the > release notes. Terse summaries are reall

[clang] [PGO] Add a clang option -fprofile-continuous that enables PGO continuous mode (PR #124353)

2025-01-27 Thread Wael Yehia via cfe-commits
@@ -785,6 +786,34 @@ static void addPGOAndCoverageFlags(const ToolChain &TC, Compilation &C, D.Diag(diag::err_drv_unsupported_option_argument) << A->getSpelling() << Val; } + if (const auto *A = Args.getLastArg(options::OPT_fprofile_continuous)) { +if (!

[clang] [Clang] Skip past code generation for unevaluated lambdas (PR #124572)

2025-01-27 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: Looking a bit more, I'm not sure I buy the premise that we don't need to mangle lambdas written in unevaluated contexts. Consider the following related example: ``` template using simd_vector = Tp; template using simd_vector_underlying_type_t = decltype([](simd_vecto

[clang] [PGO] Add a clang option -fprofile-continuous that enables PGO continuous mode (PR #124353)

2025-01-27 Thread Wael Yehia via cfe-commits
@@ -133,6 +133,16 @@ std::string getDefaultProfileGenName() { : "default_%m.profraw"; } +// Path and name of file used for profile generation +std::string getProfileGenName(const CodeGenOptions &CodeGenOpts) { w2yehia wrote: sure. FYI I was follo

  1   2   3   4   5   6   >