[clang] [llvm] [clang] Add "debug_transparent" attribute (PR #109490)

2024-09-23 Thread Michael Buch via cfe-commits
https://github.com/Michael137 commented: Seems reasonable to me modulo nits. We'll also need a test for the "attribute ignored because not DWARF" diagnostic https://github.com/llvm/llvm-project/pull/109490 ___ cfe-commits mailing list cfe-commits@list

[clang] [lld] [llvm] [mlir] [IR] Introduce `T` to `DataLayout` to represent flat address space if a target supports it (PR #108786)

2024-09-23 Thread Shilei Tian via cfe-commits
shiltian wrote: ping https://github.com/llvm/llvm-project/pull/108786 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add support for aligning BlockComments in declarations (PR #109497)

2024-09-23 Thread via cfe-commits
JessehMSFT wrote: > You have not regenerated the rst Thank you for flagging @mydeveloperday, I have regenerated ClangFormatStyleOptions.rst via dump_format_style.py and pushed an update. https://github.com/llvm/llvm-project/pull/109497 ___ cfe-commit

[clang] [SystemZ][z/OS] fix ppc-xmmintrin.c on z/OS (PR #109676)

2024-09-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-powerpc @llvm/pr-subscribers-clang Author: Zibi Sarbinowski (zibi2) Changes This will fix the following failure seeing on z/OS: ``` In file included from clang/test/CodeGen/PowerPC/ppc-xmmintrin.c:31: In file included from build/lib/clang/20/inc

[clang] [SystemZ][z/OS] fix ppc-xmmintrin.c on z/OS (PR #109676)

2024-09-23 Thread Zibi Sarbinowski via cfe-commits
https://github.com/zibi2 created https://github.com/llvm/llvm-project/pull/109676 This will fix the following failure seeing on z/OS: ``` In file included from clang/test/CodeGen/PowerPC/ppc-xmmintrin.c:31: In file included from build/lib/clang/20/include/ppc_wrappers/xmmintrin.h:44: In file in

[clang] [flang] [clang][flang] Support -time in both clang and flang (PR #109165)

2024-09-23 Thread Tarun Prabhu via cfe-commits
@@ -0,0 +1,24 @@ +// The -time option prints timing information for the various subcommands in a +// format similar to that used by gcc. When compiling and linking, this will +// include the time to call clang-${LLVM_VERSION_MAJOR} and the linker. Since +// the name of the linker

[clang] [llvm] [NVPTX] Remove nvvm.bitcast.* intrinsics (PR #107936)

2024-09-23 Thread Justin Lebar via cfe-commits
@@ -599,14 +599,6 @@ TARGET_BUILTIN(__nvvm_e4m3x2_to_f16x2_rn_relu, "V2hs", "", AND(SM_89,PTX81)) TARGET_BUILTIN(__nvvm_e5m2x2_to_f16x2_rn, "V2hs", "", AND(SM_89,PTX81)) TARGET_BUILTIN(__nvvm_e5m2x2_to_f16x2_rn_relu, "V2hs", "", AND(SM_89,PTX81)) -// Bitcast

[clang-tools-extra] Add clang-tidy external examples (PR #106675)

2024-09-23 Thread Danny Mösch via cfe-commits
https://github.com/SimplyDanny closed https://github.com/llvm/llvm-project/pull/106675 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Add clang-tidy external examples (PR #106675)

2024-09-23 Thread via cfe-commits
github-actions[bot] wrote: @MichelleCDjunaidi Congratulations on having your first Pull Request (PR) merged into the LLVM Project! Your changes will be combined with recent changes from other authors, then tested by our [build bots](https://lab.llvm.org/buildbot/). If there is a problem wit

[clang] [llvm] [AMDGPU] Convert AMDGPUResourceUsageAnalysis pass from Module to MF pass (PR #102913)

2024-09-23 Thread Janek van Oirschot via cfe-commits
JanekvO wrote: I've added a small paragraph to AMDGPUUsage wrt the symbols being generated and emitted which looks as follows in the browser: ![FunctionResourceUsage](https://github.com/user-attachments/assets/85663984-5edf-4f6b-9a43-0cc7db6071fb) https://github.com/llvm/llvm-project/pull/1029

[clang-tools-extra] ce9a2c6 - [clang-tidy][doc] Add external examples (#106675)

2024-09-23 Thread via cfe-commits
Author: MichelleCDjunaidi Date: 2024-09-23T18:13:16+02:00 New Revision: ce9a2c652104197a051db3788f3ec503cab3a79b URL: https://github.com/llvm/llvm-project/commit/ce9a2c652104197a051db3788f3ec503cab3a79b DIFF: https://github.com/llvm/llvm-project/commit/ce9a2c652104197a051db3788f3ec503cab3a79b.d

[clang] [llvm] [AMDGPU] Convert AMDGPUResourceUsageAnalysis pass from Module to MF pass (PR #102913)

2024-09-23 Thread Joseph Huber via cfe-commits
jhuber6 wrote: If we already have per-function metadata, I'm wondering how difficult it would be to put this handling in the linker. AFAIK there's already handling for `call-graph-profile` which can inform the linker of the call-graph, so we could potentially just walk that graph, find the dia

[clang] [llvm] [Clang][LLVM][AArch64] Add intrinsic for MOVT SME2 instruction (PR #97602)

2024-09-23 Thread via cfe-commits
https://github.com/SpencerAbson approved this pull request. Thanks, LGTM. - (Note for the issue with ZT0 access attributes and FEAT_SME_LUTv2) https://github.com/llvm/llvm-project/pull/97602 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

[clang] [llvm] [DLCov 2/5] Implement DebugLoc coverage tracking (PR #107279)

2024-09-23 Thread J. Ryan Stinnett via cfe-commits
@@ -11,6 +11,22 @@ #include "llvm/IR/DebugInfo.h" using namespace llvm; +#if ENABLE_DEBUGLOC_COVERAGE_TRACKING +DILocAndCoverageTracking::DILocAndCoverageTracking(const DILocation *L) +: TrackingMDNodeRef(const_cast(L)), + Kind(DebugLocKind::Normal) {} + +DebugLoc Deb

[clang] [llvm] [DLCov 2/5] Implement DebugLoc coverage tracking (PR #107279)

2024-09-23 Thread J. Ryan Stinnett via cfe-commits
@@ -22,6 +23,67 @@ namespace llvm { class LLVMContext; class raw_ostream; class DILocation; + class Function; + +#if ENABLE_DEBUGLOC_COVERAGE_TRACKING + // Used to represent different "kinds" of DebugLoc, expressing that a DebugLoc + // is either ordinary, containing

[clang] [llvm] [DLCov 2/5] Implement DebugLoc coverage tracking (PR #107279)

2024-09-23 Thread J. Ryan Stinnett via cfe-commits
@@ -2080,6 +2081,10 @@ void DwarfDebug::beginInstruction(const MachineInstr *MI) { } if (!DL) { +// FIXME: We could assert that `DL.getKind() != DebugLocKind::Temporary` +// here, or otherwise record any temporary DebugLocs seen to ensure that +// transient co

[clang] [llvm] [DLCov 2/5] Implement DebugLoc coverage tracking (PR #107279)

2024-09-23 Thread J. Ryan Stinnett via cfe-commits
https://github.com/jryans commented: Looks good overall, a few comments inline. Thanks for working on this feature, I believe this will be quite useful! 😄 https://github.com/llvm/llvm-project/pull/107279 ___ cfe-commits mailing list cfe-commits@list

[clang] [llvm] [DLCov 2/5] Implement DebugLoc coverage tracking (PR #107279)

2024-09-23 Thread J. Ryan Stinnett via cfe-commits
https://github.com/jryans edited https://github.com/llvm/llvm-project/pull/107279 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][RISCV] Add preprocessor macros for Zicfilp CFI scheme (PR #109600)

2024-09-23 Thread Craig Topper via cfe-commits
@@ -2022,6 +2035,20 @@ bool CompilerInvocation::ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, Diags.Report(diag::err_drv_invalid_value) << A->getAsString(Args) << Name; } + if (const Arg *A = Args.getLastArg(OPT_mcf_branch_label_scheme_EQ)) { +if (Opts.C

[clang] [Clang][RISCV] Add preprocessor macros for Zicfilp CFI scheme (PR #109600)

2024-09-23 Thread Craig Topper via cfe-commits
@@ -2022,6 +2035,20 @@ bool CompilerInvocation::ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, Diags.Report(diag::err_drv_invalid_value) << A->getAsString(Args) << Name; } + if (const Arg *A = Args.getLastArg(OPT_mcf_branch_label_scheme_EQ)) { ---

[clang] [Clang][RISCV] Add preprocessor macros for Zicfilp CFI scheme (PR #109600)

2024-09-23 Thread Craig Topper via cfe-commits
@@ -224,6 +224,26 @@ void RISCVTargetInfo::getTargetDefines(const LangOptions &Opts, else Builder.defineMacro("__riscv_32e"); } + + if (ISAInfo->hasExtension("zicfilp") && Opts.CFProtectionBranch) { +auto Scheme = Opts.getCFBranchLabelScheme(); +if (Scheme

[clang] [llvm] [clang] Add "debug_transparent" attribute (PR #109490)

2024-09-23 Thread Paul T Robinson via cfe-commits
@@ -109,6 +110,21 @@ static bool IsArtificial(VarDecl const *VD) { cast(VD->getDeclContext())->isImplicit()); } +static bool usesDebugTransparent(const Decl *D, const CodeGenModule &CGM) { + if (!D) +return false; + + if (auto *attr = D->get

[clang] [RISCV] Implement validateGlobalRegisterVariable. (PR #109596)

2024-09-23 Thread Craig Topper via cfe-commits
@@ -486,3 +486,15 @@ bool RISCVTargetInfo::validateCpuSupports(StringRef Feature) const { bool RISCVTargetInfo::isValidFeatureName(StringRef Name) const { return llvm::RISCVISAInfo::isSupportedExtensionFeature(Name); } + +bool RISCVTargetInfo::validateGlobalRegisterVariable(

[clang] f7d088b - [RISCV] Implement validateGlobalRegisterVariable. (#109596)

2024-09-23 Thread via cfe-commits
Author: Craig Topper Date: 2024-09-23T10:24:27-07:00 New Revision: f7d088b6168608682975759bf27b7c2ad0ae7117 URL: https://github.com/llvm/llvm-project/commit/f7d088b6168608682975759bf27b7c2ad0ae7117 DIFF: https://github.com/llvm/llvm-project/commit/f7d088b6168608682975759bf27b7c2ad0ae7117.diff

[clang] [RISCV] Implement validateGlobalRegisterVariable. (PR #109596)

2024-09-23 Thread Craig Topper via cfe-commits
https://github.com/topperc closed https://github.com/llvm/llvm-project/pull/109596 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang] Add "debug_transparent" attribute (PR #109490)

2024-09-23 Thread Paul T Robinson via cfe-commits
@@ -1379,6 +1379,9 @@ void DwarfUnit::applySubprogramAttributes(const DISubprogram *SP, DIE &SPDie, if (!SP->getTargetFuncName().empty()) addString(SPDie, dwarf::DW_AT_trampoline, SP->getTargetFuncName()); + if (SP->isDebugTransparent()) pogo59 wrote:

[clang] [clang-format] Add AlignAfterOpenBracketOptions (PR #108332)

2024-09-23 Thread Gedare Bloom via cfe-commits
gedare wrote: Rebased to main to pick up recent regression fixes BlockIndent/AlwaysBreak. https://github.com/llvm/llvm-project/pull/108332 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi

[clang] [llvm] riscv: Support -mstack-protector-guard=tls (PR #108942)

2024-09-23 Thread Craig Topper via cfe-commits
@@ -21228,6 +21228,14 @@ Value *RISCVTargetLowering::getIRStackGuard(IRBuilderBase &IRB) const { if (Subtarget.isTargetAndroid()) return useTpOffset(IRB, -0x18); + Module *M = IRB.GetInsertBlock()->getParent()->getParent(); topperc wrote: I think `get

[clang] [llvm] [DLCov 3/5] Implement DebugLoc origin-tracking (PR #107369)

2024-09-23 Thread J. Ryan Stinnett via cfe-commits
@@ -1279,6 +1279,9 @@ void Instruction::swapProfMetadata() { void Instruction::copyMetadata(const Instruction &SrcInst, ArrayRef WL) { + if (WL.empty() || is_contained(WL, LLVMContext::MD_dbg)) +setDebugLoc(SrcInst.getDebugLoc()); --

[clang] [llvm] [DLCov 3/5] Implement DebugLoc origin-tracking (PR #107369)

2024-09-23 Thread J. Ryan Stinnett via cfe-commits
@@ -55,6 +73,28 @@ namespace sys { ///specified, the entire frame is printed. void PrintStackTrace(raw_ostream &OS, int Depth = 0); +#if ENABLE_DEBUGLOC_ORIGIN_TRACKING +#ifdef NDEBUG +#error DebugLoc origin-tracking should not be enabled in Release builds. +#endif

[clang] [llvm] [RISCV] Mark Zacas as non-experimental (PR #109651)

2024-09-23 Thread Craig Topper via cfe-commits
https://github.com/topperc edited https://github.com/llvm/llvm-project/pull/109651 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PowerPC] Fix incorrect store alignment for __builtin_vsx_build_pair() (PR #108606)

2024-09-23 Thread Lei Huang via cfe-commits
https://github.com/lei137 updated https://github.com/llvm/llvm-project/pull/108606 >From 7d0d50768c75f57663d1c487157c8969e621f128 Mon Sep 17 00:00:00 2001 From: Lei Huang Date: Fri, 13 Sep 2024 17:11:09 + Subject: [PATCH] [PowerPC] Fix incorrect store alignment for __builtin_vsx_build_pair

[clang] [llvm] [RISCV] Mark Zacas as non-experimental (PR #109651)

2024-09-23 Thread Craig Topper via cfe-commits
https://github.com/topperc edited https://github.com/llvm/llvm-project/pull/109651 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PowerPC] Fix incorrect store alignment for __builtin_vsx_build_pair() (PR #108606)

2024-09-23 Thread Nemanja Ivanovic via cfe-commits
nemanjai wrote: Will this affect the code that is generated for ‘__vector_quad’ values? There is no direct way to load and store those so they will use pair loads and stores. https://github.com/llvm/llvm-project/pull/108606 ___ cfe-commits mailing l

[clang] [llvm] [DLCov 3/5] Implement DebugLoc origin-tracking (PR #107369)

2024-09-23 Thread J. Ryan Stinnett via cfe-commits
@@ -50,11 +50,15 @@ class TargetRegisterInfo; class MergePotentialsElt { unsigned Hash; MachineBasicBlock *Block; - DebugLoc BranchDebugLoc; + // We use MDNode rather than DebugLoc here because under certain CMake + // options*, DebugLoc may conta

[clang] [llvm] [DLCov 3/5] Implement DebugLoc origin-tracking (PR #107369)

2024-09-23 Thread J. Ryan Stinnett via cfe-commits
@@ -253,6 +253,122 @@ static bool printSymbolizedStackTrace(StringRef Argv0, void **StackTrace, return true; } +#if ENABLE_DEBUGLOC_ORIGIN_TRACKING +void sys::symbolizeAddresses(AddressSet &Addresses, + SymbolizedAddressMap &SymbolizedAddresses)

[clang] [llvm] [DLCov 3/5] Implement DebugLoc origin-tracking (PR #107369)

2024-09-23 Thread J. Ryan Stinnett via cfe-commits
@@ -115,6 +138,23 @@ namespace llvm { DebugLocKind getKind() const { return Loc.Kind; } #endif +#if ENABLE_DEBUGLOC_ORIGIN_TRACKING +#if !ENABLE_DEBUGLOC_COVERAGE_TRACKING +#error Cannot enable DebugLoc origin-tracking without coverage-tracking! +#endif jr

[clang] [llvm] [DLCov 3/5] Implement DebugLoc origin-tracking (PR #107369)

2024-09-23 Thread J. Ryan Stinnett via cfe-commits
@@ -253,6 +253,122 @@ static bool printSymbolizedStackTrace(StringRef Argv0, void **StackTrace, return true; } +#if ENABLE_DEBUGLOC_ORIGIN_TRACKING +void sys::symbolizeAddresses(AddressSet &Addresses, + SymbolizedAddressMap &SymbolizedAddresses)

[clang] [llvm] [DLCov 3/5] Implement DebugLoc origin-tracking (PR #107369)

2024-09-23 Thread J. Ryan Stinnett via cfe-commits
@@ -48,22 +64,29 @@ namespace llvm { Temporary }; - // Extends TrackingMDNodeRef to also store a DebugLocKind, allowing Debugify - // to ignore intentionally-empty DebugLocs. - class DILocAndCoverageTracking : public TrackingMDNodeRef { + // Extends TrackingMDNodeRef

[clang] 62f3eae - [PowerPC] Fix incorrect store alignment for __builtin_vsx_build_pair() (#108606)

2024-09-23 Thread via cfe-commits
Author: Lei Huang Date: 2024-09-23T13:30:59-04:00 New Revision: 62f3eae466cc6af101a9bfa21e2af4ff5c95658d URL: https://github.com/llvm/llvm-project/commit/62f3eae466cc6af101a9bfa21e2af4ff5c95658d DIFF: https://github.com/llvm/llvm-project/commit/62f3eae466cc6af101a9bfa21e2af4ff5c95658d.diff LOG

[clang] [llvm] [RISCV] Mark Zacas as non-experimental (PR #109651)

2024-09-23 Thread Craig Topper via cfe-commits
@@ -287,6 +288,11 @@ Supported ``Za128rs``, ``Za64rs``, ``Zama16b``, ``Zic64b``, ``Ziccamoa``, ``Ziccif``, ``Zicclsm``, ``Ziccrse``, ``Shcounterenvw``, ``Shgatpa``, ``Shtvala``, ``Shvsatpa``, ``Shvstvala``, ``Shvstvecd``, ``Ssccptr``, ``Sscounterenw``, ``Ssstateen``, ``Ssstric

[clang] [PowerPC] Fix incorrect store alignment for __builtin_vsx_build_pair() (PR #108606)

2024-09-23 Thread Lei Huang via cfe-commits
https://github.com/lei137 closed https://github.com/llvm/llvm-project/pull/108606 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [DLCov 3/5] Implement DebugLoc origin-tracking (PR #107369)

2024-09-23 Thread J. Ryan Stinnett via cfe-commits
https://github.com/jryans requested changes to this pull request. More exciting work! 😄 Seems roughly sensible, but appears to duplicate some code that can hopefully be shared. https://github.com/llvm/llvm-project/pull/107369 ___ cfe-commits mailing l

[clang] [llvm] [DLCov 3/5] Implement DebugLoc origin-tracking (PR #107369)

2024-09-23 Thread J. Ryan Stinnett via cfe-commits
@@ -28,6 +31,11 @@ #include "llvm/Support/FileSystem.h" #include "llvm/Support/JSON.h" #include +#if ENABLE_DEBUGLOC_ORIGIN_TRACKING +// We need the Signals header to operate on stacktraces if we're using DebugLoc jryans wrote: stacktrace -> stack trace http

[clang] [llvm] [DLCov 3/5] Implement DebugLoc origin-tracking (PR #107369)

2024-09-23 Thread J. Ryan Stinnett via cfe-commits
@@ -487,14 +490,15 @@ def Main(): if bugs_metadata == "DILocation": try: +origin = bug["origin"] action = bug["action"] bb_name = bug["bb-name"]

[clang] [llvm] [DLCov 3/5] Implement DebugLoc origin-tracking (PR #107369)

2024-09-23 Thread J. Ryan Stinnett via cfe-commits
https://github.com/jryans edited https://github.com/llvm/llvm-project/pull/107369 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV][VCIX] Add vcix_state to GNU inline assembly register set (PR #106914)

2024-09-23 Thread Craig Topper via cfe-commits
https://github.com/topperc approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/106914 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Refactor collection of multi-level template argument lists (PR #106585)

2024-09-23 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: Reduced further to: ```cpp template struct A { template static constexpr bool f(); }; template<> template constexpr bool A<0>::f() { return A<1>::f(); // note: undefined function 'f' cannot be used in a constant expression } template<> template constexpr bool A<1>

[clang] [clang-format] Add AlignAfterOpenBracketOptions (PR #108332)

2024-09-23 Thread Gedare Bloom via cfe-commits
https://github.com/gedare updated https://github.com/llvm/llvm-project/pull/108332 >From d099408d791fef55b3064f6597bdd2fb0b4537da Mon Sep 17 00:00:00 2001 From: Gedare Bloom Date: Thu, 20 Jun 2024 17:35:39 -0600 Subject: [PATCH 1/2] Format: add AlignAfterOpenBracketOptions Introduce new option

[clang] [RISCV][FMV] Support target_version (PR #99040)

2024-09-23 Thread Craig Topper via cfe-commits
@@ -11028,7 +11029,14 @@ static bool CheckMultiVersionValue(Sema &S, const FunctionDecl *FD) { if (TVA) { llvm::SmallVector Feats; -TVA->getFeatures(Feats); +if (S.getASTContext().getTargetInfo().getTriple().isRISCV()) { + ParsedTargetAttr ParseInfo = +

[clang] [RISCV][FMV] Support target_version (PR #99040)

2024-09-23 Thread Craig Topper via cfe-commits
@@ -3056,6 +3056,45 @@ bool Sema::checkTargetVersionAttr(SourceLocation LiteralLoc, Decl *D, enum SecondParam { None }; enum ThirdParam { Target, TargetClones, TargetVersion }; llvm::SmallVector Features; + if (Context.getTargetInfo().getTriple().isRISCV()) { + +llv

[clang] [RISCV][FMV] Support target_version (PR #99040)

2024-09-23 Thread Craig Topper via cfe-commits
@@ -3056,6 +3056,47 @@ bool Sema::checkTargetVersionAttr(SourceLocation LiteralLoc, Decl *D, enum SecondParam { None }; enum ThirdParam { Target, TargetClones, TargetVersion }; llvm::SmallVector Features; + if (Context.getTargetInfo().getTriple().isRISCV()) { +

[clang] [RISCV][FMV] Support target_version (PR #99040)

2024-09-23 Thread Craig Topper via cfe-commits
@@ -3056,6 +3056,47 @@ bool Sema::checkTargetVersionAttr(SourceLocation LiteralLoc, Decl *D, enum SecondParam { None }; enum ThirdParam { Target, TargetClones, TargetVersion }; llvm::SmallVector Features; + if (Context.getTargetInfo().getTriple().isRISCV()) { + +llv

[clang] [llvm] riscv: Support -mstack-protector-guard=tls (PR #108942)

2024-09-23 Thread Keith Packard via cfe-commits
https://github.com/keith-packard edited https://github.com/llvm/llvm-project/pull/108942 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] riscv: Support -mstack-protector-guard=tls (PR #108942)

2024-09-23 Thread Keith Packard via cfe-commits
@@ -21228,6 +21228,14 @@ Value *RISCVTargetLowering::getIRStackGuard(IRBuilderBase &IRB) const { if (Subtarget.isTargetAndroid()) return useTpOffset(IRB, -0x18); + Module *M = IRB.GetInsertBlock()->getParent()->getParent(); keith-packard wrote: Thanks

[clang] [llvm] riscv: Support -mstack-protector-guard=tls (PR #108942)

2024-09-23 Thread Keith Packard via cfe-commits
https://github.com/keith-packard updated https://github.com/llvm/llvm-project/pull/108942 >From 156b989feea26694b291cde9be637947be9aca67 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Mon, 16 Sep 2024 15:41:38 +0200 Subject: [PATCH 1/3] riscv: Support -mstack-protector-guard=tls Add suppor

[clang] [llvm] riscv: Support -mstack-protector-guard=tls (PR #108942)

2024-09-23 Thread Keith Packard via cfe-commits
@@ -21228,6 +21228,14 @@ Value *RISCVTargetLowering::getIRStackGuard(IRBuilderBase &IRB) const { if (Subtarget.isTargetAndroid()) return useTpOffset(IRB, -0x18); + Module *M = IRB.GetInsertBlock()->getParent()->getParent(); keith-packard wrote: Yup, g

[clang] nonblocking/nonallocating attributes: 2nd pass caller/callee analysis (PR #99656)

2024-09-23 Thread via cfe-commits
Sirraide wrote: > My sense is that it would be weird for `-Wall` not to include > `-Wfunction-effects`, but that it would be OK for `-Wfunction-effects` not to > be enabled by default. Hmm, hard to say; function effects are sort of a separate feature on their own, so my first reaction just no

[clang] [HLSL] Array by-value assignment (PR #109323)

2024-09-23 Thread Justin Bogner via cfe-commits
@@ -0,0 +1,50 @@ +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -emit-llvm -disable-llvm-passes -o - %s | FileCheck %s --enable-var-scope + +// CHECK-LABEL: define void {{.*}}arr_assign1 +// CHECK: [[Arr:%.*]] = alloca [2 x i32], align 4 +// CHECK: [[Arr2:%.*]] = allo

[clang] nonblocking/nonallocating attributes: 2nd pass caller/callee analysis (PR #99656)

2024-09-23 Thread Doug Wyatt via cfe-commits
dougsonos wrote: @Sirraide , glad you're back and better, and thanks for the comments. I think I agree and will remove the new diagnostics from "-Wall". I also agree that documentation is wanting. I will look into expanding this, whether in the general attributes documentation or a new page (I

[clang] nonblocking/nonallocating attributes: 2nd pass caller/callee analysis (PR #99656)

2024-09-23 Thread via cfe-commits
Sirraide wrote: > I also agree that documentation is wanting. I will look into expanding this, > whether in the general attributes documentation or a new page (I'm speaking > from a rusty memory of precedents, will go explore). We have a separate page for e.g. `nonnull` and friends; effects fe

[clang] 8be6b10 - [NVPTX] Remove nvvm.bitcast.* intrinsics (#107936)

2024-09-23 Thread via cfe-commits
Author: Alex MacLean Date: 2024-09-23T11:24:07-07:00 New Revision: 8be6b108fbd35c6f50db488a0a5462eba6852cfd URL: https://github.com/llvm/llvm-project/commit/8be6b108fbd35c6f50db488a0a5462eba6852cfd DIFF: https://github.com/llvm/llvm-project/commit/8be6b108fbd35c6f50db488a0a5462eba6852cfd.diff

[clang] [llvm] [NVPTX] Remove nvvm.bitcast.* intrinsics (PR #107936)

2024-09-23 Thread Alex MacLean via cfe-commits
https://github.com/AlexMaclean closed https://github.com/llvm/llvm-project/pull/107936 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] nonblocking/nonallocating attributes: 2nd pass caller/callee analysis (PR #99656)

2024-09-23 Thread via cfe-commits
Sirraide wrote: > I feel like this might be the way to go: have some attribute that makes the > analyser just ignore calls to a function entirely Actually, I just saw that you settled on `[[noreturn]]` + `noexcept`, which seems like a reasonable combination. I don’t think we need an extra attr

[clang] Mark tests as unsupported when targeting z/OS (PR #107916)

2024-09-23 Thread Sean Perry via cfe-commits
perry-ca wrote: @abhina-sree could you review this. Thanks https://github.com/llvm/llvm-project/pull/107916 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Include LLVM CodeGen CMake file (PR #109601)

2024-09-23 Thread Saleem Abdulrasool via cfe-commits
@@ -1,3 +1,7 @@ +if(EXISTS ${LLVM_MAIN_SRC_DIR}/include/llvm/CodeGen AND CLANG_BUILT_STANDALONE) compnerd wrote: I think that I would rather have the cases mirrored here - the path should always exist in general, it is only the standalone case that is special.

[clang] [Clang] Include LLVM CodeGen CMake file (PR #109601)

2024-09-23 Thread Saleem Abdulrasool via cfe-commits
@@ -1,3 +1,7 @@ +if(EXISTS ${LLVM_MAIN_SRC_DIR}/include/llvm/CodeGen AND CLANG_BUILT_STANDALONE) + add_subdirectory(${LLVM_MAIN_SRC_DIR}/include/llvm/CodeGen llvm/lib/CodeGen) +endif() compnerd wrote: IIRC, even in the standalone case, you need to identify the L

[clang] Clang tooling generated visibility macros for Clang (PR #109702)

2024-09-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-risc-v Author: Thomas Fransham (fsfod) Changes The visibility macros generated here are created by a [ids](https://github.com/fsfod/ids) clang tooling based tool that @compnerd wrote and I've extended. To reduce the numbers of exports and to avo

[clang] Clang tooling generated visibility macros for Clang (PR #109702)

2024-09-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-arm Author: Thomas Fransham (fsfod) Changes The visibility macros generated here are created by a [ids](https://github.com/fsfod/ids) clang tooling based tool that @compnerd wrote and I've extended. To reduce the numbers of exports and to avoid

[clang] Clang tooling generated visibility macros for Clang (PR #109702)

2024-09-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Thomas Fransham (fsfod) Changes The visibility macros generated here are created by a [ids](https://github.com/fsfod/ids) clang tooling based tool that @compnerd wrote and I've extended. To reduce the numbers of exports and to avoid explic

[clang] Clang tooling generated visibility macros for Clang (PR #109702)

2024-09-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-analysis @llvm/pr-subscribers-backend-aarch64 Author: Thomas Fransham (fsfod) Changes The visibility macros generated here are created by a [ids](https://github.com/fsfod/ids) clang tooling based tool that @compnerd wrote and I've extended. To red

[clang] Clang tooling generated visibility macros for Clang (PR #109702)

2024-09-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-hlsl Author: Thomas Fransham (fsfod) Changes The visibility macros generated here are created by a [ids](https://github.com/fsfod/ids) clang tooling based tool that @compnerd wrote and I've extended. To reduce the numbers of exports and to avoid explici

[clang] [llvm] riscv: Support -mstack-protector-guard=tls (PR #108942)

2024-09-23 Thread Craig Topper via cfe-commits
https://github.com/topperc approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/108942 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Include LLVM CodeGen CMake file (PR #109601)

2024-09-23 Thread Tristan Ross via cfe-commits
@@ -1,3 +1,7 @@ +if(EXISTS ${LLVM_MAIN_SRC_DIR}/include/llvm/CodeGen AND CLANG_BUILT_STANDALONE) RossComputerGuy wrote: Ok, will do. https://github.com/llvm/llvm-project/pull/109601 ___ cfe-commits mailing list cfe-com

[clang] [Clang] Include LLVM CodeGen CMake file (PR #109601)

2024-09-23 Thread Tristan Ross via cfe-commits
@@ -1,3 +1,7 @@ +if(EXISTS ${LLVM_MAIN_SRC_DIR}/include/llvm/CodeGen AND CLANG_BUILT_STANDALONE) + add_subdirectory(${LLVM_MAIN_SRC_DIR}/include/llvm/CodeGen llvm/lib/CodeGen) +endif() RossComputerGuy wrote: I'm not sure, are you meaning to use `LLVM_DIR` instea

[clang] [llvm] riscv: Support -mstack-protector-guard=tls (PR #108942)

2024-09-23 Thread Keith Packard via cfe-commits
https://github.com/keith-packard updated https://github.com/llvm/llvm-project/pull/108942 >From 156b989feea26694b291cde9be637947be9aca67 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Mon, 16 Sep 2024 15:41:38 +0200 Subject: [PATCH 1/4] riscv: Support -mstack-protector-guard=tls Add suppor

[clang] [Clang] Include LLVM CodeGen CMake file (PR #109601)

2024-09-23 Thread Jon Roelofs via cfe-commits
jroelofs wrote: @compnerd @etcwilde WDYT about conditionalizing the new dependency with an `if (TARGET vt_gen)` instead of doing the `add_subdirectory()` dance? https://github.com/llvm/llvm-project/pull/109601 ___ cfe-commits mailing list cfe-commits@

[clang] [llvm] riscv: Support -mstack-protector-guard=tls (PR #108942)

2024-09-23 Thread Keith Packard via cfe-commits
@@ -3644,13 +3645,28 @@ static void RenderSSPOptions(const Driver &D, const ToolChain &TC, << A->getOption().getName() << Value << "sysreg global"; return; } +if (EffectiveTriple.isRISCV()) { + if (Value != "tls" && Value != "global") { ---

[clang] [llvm] Add cross builtins and cross HLSL function to DirectX and SPIR-V backend (PR #109180)

2024-09-23 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl edited https://github.com/llvm/llvm-project/pull/109180 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Add cross builtins and cross HLSL function to DirectX and SPIR-V backend (PR #109180)

2024-09-23 Thread Farzon Lotfi via cfe-commits
@@ -1704,6 +1704,20 @@ bool SemaHLSL::CheckBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall) { return true; break; } + case Builtin::BI__builtin_hlsl_cross: { +if (SemaRef.checkArgCount(TheCall, 2)) + return true; +if (CheckVectorElementCallA

[clang] [llvm] Add cross builtins and cross HLSL function to DirectX and SPIR-V backend (PR #109180)

2024-09-23 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,31 @@ +// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -fnative-half-type -disable-llvm-passes -verify -verify-ignore-unexpected + +void test_too_few_arg() +{ + return __builtin_hlsl_cross(); + // expected-error@-1 {{too few arg

[clang] [llvm] [CGData][ThinLTO] Global Outlining with Two-CodeGen Rounds (PR #90933)

2024-09-23 Thread Kyungwoo Lee via cfe-commits
kyulee-com wrote: @teresajohnson Do you have any concern or comment on this direction? https://github.com/llvm/llvm-project/pull/90933 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV][VCIX] Add vcix_state to GNU inline assembly register set (PR #106914)

2024-09-23 Thread Brandon Wu via cfe-commits
https://github.com/4vtomat updated https://github.com/llvm/llvm-project/pull/106914 >From be771da74a7663d56cdf850c10b4daa47c087bcc Mon Sep 17 00:00:00 2001 From: Brandon Wu Date: Sun, 1 Sep 2024 09:35:34 -0700 Subject: [PATCH 1/3] [RISCV][VCIX] Precommit test --- llvm/test/CodeGen/RISCV/inlin

[clang] 5a4c6f9 - [Loads] Check context instruction for context-sensitive derefability (#109277)

2024-09-23 Thread via cfe-commits
Author: Nikita Popov Date: 2024-09-23T09:13:09+02:00 New Revision: 5a4c6f97997f3cdfa9d98f7f0b546e331ee9cc4a URL: https://github.com/llvm/llvm-project/commit/5a4c6f97997f3cdfa9d98f7f0b546e331ee9cc4a DIFF: https://github.com/llvm/llvm-project/commit/5a4c6f97997f3cdfa9d98f7f0b546e331ee9cc4a.diff

[clang] [llvm] [Loads] Check context instruction for context-sensitive derefability (PR #109277)

2024-09-23 Thread Nikita Popov via cfe-commits
https://github.com/nikic closed https://github.com/llvm/llvm-project/pull/109277 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Rewrite] Avoid repeated hash lookups (NFC) (PR #109605)

2024-09-23 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. LGTM, but it would probably make sense to make BlockByCopyDecls a SetVector, instead of having separate vector and set. https://github.com/llvm/llvm-project/pull/109605 ___ cfe-commits mailing list

[clang] [Rewrite] Avoid repeated hash lookups (NFC) (PR #109605)

2024-09-23 Thread Nikita Popov via cfe-commits
https://github.com/nikic edited https://github.com/llvm/llvm-project/pull/109605 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AST] Avoid repeated hash lookups (NFC) (PR #109603)

2024-09-23 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. https://github.com/llvm/llvm-project/pull/109603 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Include the clang-shlib CMake project when building for MSVC (PR #109457)

2024-09-23 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: @fsfod, do you have a clue what's going on here? I do not see how this could be related to the current PR. https://github.com/llvm/llvm-project/pull/109457 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.or

[clang-tools-extra] [clang-tidy] Create bugprone-bit-cast-pointers check (PR #108083)

2024-09-23 Thread Carlos Galvez via cfe-commits
carlosgalvezp wrote: Friendly ping, let me know if there's anything else that should be addressed! https://github.com/llvm/llvm-project/pull/108083 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/

[clang] [clang] Fix false warning on reinterpret_casting unknown template type (PR #109430)

2024-09-23 Thread Arseniy Zaostrovnykh via cfe-commits
@@ -2092,6 +2092,10 @@ void Sema::CheckCompatibleReinterpretCast(QualType SrcType, QualType DestType, } } + if (SrcTy->isTemplateTypeParmType() || DestTy->isTemplateTypeParmType()) { necto wrote: Good point Fixed in 541e0af03998 https://github.com/ll

[clang] [clang] Fix false warning on reinterpret_casting unknown template type (PR #109430)

2024-09-23 Thread Arseniy Zaostrovnykh via cfe-commits
https://github.com/necto updated https://github.com/llvm/llvm-project/pull/109430 >From 3533863fd58f54d2d5570b4f593d2635e1e11aa8 Mon Sep 17 00:00:00 2001 From: Arseniy Zaostrovnykh Date: Fri, 20 Sep 2024 09:16:17 +0200 Subject: [PATCH 1/2] [clang] Fix false warning on reinterpret_casting unknow

[clang] [llvm] [clang] Add cc1 --output-asm-variant= to set output syntax (PR #109360)

2024-09-23 Thread LIU Hao via cfe-commits
lhmouse wrote: Thanks. The idea looks awesome! https://github.com/llvm/llvm-project/pull/109360 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] [libclc] use default paths with find_program when possible (PR #105969)

2024-09-23 Thread Matt Arsenault via cfe-commits
arsenm wrote: > Nixpkgs has no intention of moving away from standalone builds. I encourage you to acquire that intention. IMO libclc should not support the standalone build, and this should be version locked to the exact compiler commit. It's compiler data, not a real library https://github

[clang] [analyzer][StackAddrEscapeChecker] Fix assert failure for alloca regions (PR #109655)

2024-09-23 Thread Arseniy Zaostrovnykh via cfe-commits
necto wrote: > Please mark the line in the test with `no-crash` where previously crashed. Done in b2ed9f9 > Speaking of the fix, I think anything is better than a crash, but I wonder if > we could do more. To me, once an alloca region goes out of scope, that should > behave just as if a regul

[clang] [analyzer][StackAddrEscapeChecker] Fix assert failure for alloca regions (PR #109655)

2024-09-23 Thread Arseniy Zaostrovnykh via cfe-commits
https://github.com/necto edited https://github.com/llvm/llvm-project/pull/109655 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] modernize-use-nullptr matches "NULL" in templates (PR #109169)

2024-09-23 Thread Thomas Köppe via cfe-commits
tkoeppe wrote: What happens next, do we need more approvals? @EugeneZelenko? https://github.com/llvm/llvm-project/pull/109169 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [lldb] [llvm] [SystemZ][z/OS] Propagate IsText parameter to open text files as text (PR #107906)

2024-09-23 Thread Abhina Sree via cfe-commits
abhina-sree wrote: > OpenFlags |= sys::fs::OF_Text; Thanks, I've made your suggested change and I opened a new PR here https://github.com/llvm/llvm-project/pull/109664. A short explanation for why distinguishing text and binary files on z/OS is important is because the native encoding is not

[libclc] [libclc] use default paths with find_program when possible (PR #105969)

2024-09-23 Thread Tristan Ross via cfe-commits
RossComputerGuy wrote: > IMO libclc should not support the standalone build, and this should be > version locked to the exact compiler commit. So it should be built along with the core of LLVM? Also, we package LLVM per version per subproject. > could this be avoided by changing the Nixpkgs b

[clang-tools-extra] [clang-tidy] modernize-use-nullptr matches "NULL" in templates (PR #109169)

2024-09-23 Thread via cfe-commits
EugeneZelenko wrote: > What happens next, do we need more approvals? @EugeneZelenko? I think two approvals from active developers are enough. https://github.com/llvm/llvm-project/pull/109169 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http

<    1   2   3   4   5   >