[clang] [clang][modules] giving the __stddef_ headers their own modules can cause redeclaration errors with -fbuiltin-headers-in-system-modules (PR #84127)

2024-03-05 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder edited https://github.com/llvm/llvm-project/pull/84127 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][modules] giving the __stddef_ headers their own modules can cause redeclaration errors with -fbuiltin-headers-in-system-modules (PR #84127)

2024-03-05 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder edited https://github.com/llvm/llvm-project/pull/84127 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] d3df2a8 - [C++20] [Modules] Handle transitive import in the module properly

2024-03-05 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2024-03-06T15:46:55+08:00 New Revision: d3df2a834cf6febb44c699d109b9e7f622194837 URL: https://github.com/llvm/llvm-project/commit/d3df2a834cf6febb44c699d109b9e7f622194837 DIFF: https://github.com/llvm/llvm-project/commit/d3df2a834cf6febb44c699d109b9e7f622194837.diff

[clang] [clang-format] Handle common C++ non-keyword types as such (PR #83709)

2024-03-05 Thread via cfe-commits
@@ -268,20 +268,24 @@ const FormatToken *LeftRightQualifierAlignmentFixer::analyzeRight( if (isPossibleMacro(TypeToken)) return Tok; + const bool IsCpp = Style.isCpp(); + // The case `const long long int volatile` -> `long long int const volatile` // The case

[clang] [CUDA] Correctly set CUDA default architecture (PR #84017)

2024-03-05 Thread Jonas Hahnfeld via cfe-commits
@@ -2,56 +2,56 @@ // REQUIRES: nvptx-registered-target // REQUIRES: zlib -// RUN: not %clang -### --target=x86_64-linux-gnu -c %s -g -gz 2>&1 \ +// RUN: %clang -### --target=x86_64-linux-gnu --offload-arch=sm_52 -nogpulib -nogpuinc -c %s -g -gz 2>&1 \ // RUN: | FileCheck %s

[clang] [clang-format] Handle common C++ non-keyword types as such (PR #83709)

2024-03-05 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/83709 >From 91d6e4c6e0ae2e1d79edf496df22978a4e1f3e1a Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Sat, 2 Mar 2024 22:08:29 -0800 Subject: [PATCH 1/6] [clang-format] Handle common C++ non-keyword types as such Fixes

[clang] [clang-format] Handle common C++ non-keyword types as such (PR #83709)

2024-03-05 Thread Owen Pan via cfe-commits
@@ -620,6 +620,23 @@ TEST_F(TokenAnnotatorTest, UnderstandsCasts) { ASSERT_EQ(Tokens.size(), 8u) << Tokens; EXPECT_TOKEN(Tokens[3], tok::r_paren, TT_Unknown); EXPECT_TOKEN(Tokens[4], tok::amp, TT_BinaryOperator); + + Tokens = annotate("#define FOO(bar)

[clang] [clang-format] Handle common C++ non-keyword types as such (PR #83709)

2024-03-05 Thread Owen Pan via cfe-commits
@@ -268,20 +268,24 @@ const FormatToken *LeftRightQualifierAlignmentFixer::analyzeRight( if (isPossibleMacro(TypeToken)) return Tok; + const bool IsCpp = Style.isCpp(); + // The case `const long long int volatile` -> `long long int const volatile` // The case

[clang] [clang-format] Handle common C++ non-keyword types as such (PR #83709)

2024-03-05 Thread Owen Pan via cfe-commits
@@ -71,8 +71,21 @@ bool FormatToken::isSimpleTypeSpecifier() const { } } -bool FormatToken::isTypeOrIdentifier() const { - return isSimpleTypeSpecifier() || Tok.isOneOf(tok::kw_auto, tok::identifier); +// Sorted common C++ non-keyword types. +static SmallVector

[clang] [clang][modules] giving the __stddef_ headers their own modules can cause redeclaration errors with -fbuiltin-headers-in-system-modules (PR #84127)

2024-03-05 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder updated https://github.com/llvm/llvm-project/pull/84127 >From e34ccad2b82b75c050d12bbb987529c320c0df9d Mon Sep 17 00:00:00 2001 From: Ian Anderson Date: Tue, 5 Mar 2024 22:56:36 -0800 Subject: [PATCH] [clang][modules] giving the __stddef_ headers their own

[clang] [clang][modules] giving the __stddef_ headers their own modules can cause redeclaration errors with -fbuiltin-headers-in-system-modules (PR #84127)

2024-03-05 Thread Ian Anderson via cfe-commits
@@ -7,7 +7,7 @@ *===---=== */ -#if !defined(NULL) || !__has_feature(modules) +#if !defined(NULL) || !__building_module(_Builtin_stddef) ian-twilightcoder wrote: ``` #if !defined(NULL) ||

[clang] [llvm] [RISCV] Add back SiFive's cdiscard.d.l1 and cflush.d.l1 instructions. (PR #83896)

2024-03-05 Thread Craig Topper via cfe-commits
topperc wrote: > > By the way, is there any plan to support `CFLUSH.I.L1` in the future? > > Flushing the instruction cache doesn't make sense given it can never be > dirty. Invalidating/discarding does, but that's just what fence.i is doing? A cflush.i.l1 did appear in some SiFive manual at

[clang] [clang][modules] giving the __stddef_ headers their own modules can cause redeclaration errors with -fbuiltin-headers-in-system-modules (PR #84127)

2024-03-05 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 bf631c63d01057321c070520a56a150ede32e47d 0cc4b77fce06730f6a6a8b242384036018ebfe79 --

[clang] [clang][modules] giving the __stddef_ headers their own modules can cause redeclaration errors with -fbuiltin-headers-in-system-modules (PR #84127)

2024-03-05 Thread Ian Anderson via cfe-commits
ian-twilightcoder wrote: We should consider this for LLVM 18, it's a regression from https://reviews.llvm.org/D159064 https://github.com/llvm/llvm-project/pull/84127 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang][modules] giving the __stddef_ headers their own modules can cause redeclaration errors with -fbuiltin-headers-in-system-modules (PR #84127)

2024-03-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 @llvm/pr-subscribers-clang Author: Ian Anderson (ian-twilightcoder) Changes On Apple platforms, some of the stddef.h types are also declared in system headers. In particular NULL has a conflicting declaration in sys/_types/_null.h. When

[clang] [clang][modules] giving the __stddef_ headers their own modules can cause redeclaration errors with -fbuiltin-headers-in-system-modules (PR #84127)

2024-03-05 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder created https://github.com/llvm/llvm-project/pull/84127 On Apple platforms, some of the stddef.h types are also declared in system headers. In particular NULL has a conflicting declaration in . When that's in a different module from <__stddef_null.h>,

[clang] [alpha.webkit.UncountedLocalVarsChecker] Allow uncounted object references within trivial statements (PR #82229)

2024-03-05 Thread Ryosuke Niwa via cfe-commits
@@ -474,4 +504,22 @@ bool TrivialFunctionAnalysis::isTrivialImpl( return Result; } +bool TrivialFunctionAnalysis::isTrivialImpl( +const Stmt *S, TrivialFunctionAnalysis::CacheTy ) { + // If the statement isn't in the cache, conservatively assume that + // it's not

[clang] [llvm] [RISCV] Add back SiFive's cdiscard.d.l1 and cflush.d.l1 instructions. (PR #83896)

2024-03-05 Thread Jessica Clarke via cfe-commits
jrtc27 wrote: > By the way, is there any plan to support `CFLUSH.I.L1` in the future? Flushing the instruction cache doesn't make sense given it can never be dirty. Invalidating/discarding does, but that's just what fence.i is doing? https://github.com/llvm/llvm-project/pull/83896

[clang] [alpha.webkit.UncountedLocalVarsChecker] Allow uncounted object references within trivial statements (PR #82229)

2024-03-05 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/82229 >From 234e301ab2721ddb2f4b43589785015a7d0aa304 Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Mon, 19 Feb 2024 01:07:13 -0800 Subject: [PATCH 1/7] [alpha.webkit.UncountedLocalVarsChecker] Allow uncounted object

[clang] [llvm] Implement a subset of builtin_cpu_supports() features (PR #82809)

2024-03-05 Thread Nemanja Ivanovic via cfe-commits
@@ -364,7 +364,14 @@ class LLVM_LIBRARY_VISIBILITY PPCTargetInfo : public TargetInfo { // have Glibc since it is Glibc that provides the HWCAP[2] in the auxv. static constexpr int MINIMUM_AIX_OS_MAJOR = 7; static constexpr int MINIMUM_AIX_OS_MINOR = 2; - bool

[clang] [llvm] Implement a subset of builtin_cpu_supports() features (PR #82809)

2024-03-05 Thread Nemanja Ivanovic via cfe-commits
@@ -141,23 +149,30 @@ PPC_LNX_CPU("power10",47) #define AIX_BUILTIN_PPC_TRUE 1 #define AIX_BUILTIN_PPC_FALSE 0 #define USE_SYS_CONF 2 + #define SYS_CALL 3 // Supported COMPARE_OP values. #define COMP_EQ 0 + #define COMP_GT 1 + #define COMP_GE 2 + #define

[clang] [llvm] Implement a subset of builtin_cpu_supports() features (PR #82809)

2024-03-05 Thread Nemanja Ivanovic via cfe-commits
@@ -0,0 +1,171 @@ +// RUN: echo "int main() { return __builtin_cpu_supports(\"4xxmac\");}" > %t.c nemanjai wrote: This is an interesting way of testing, where we create each test on the fly. I am not against it if it works on all platforms (including Windows).

[clang] [llvm] Implement a subset of builtin_cpu_supports() features (PR #82809)

2024-03-05 Thread Nemanja Ivanovic via cfe-commits
@@ -16570,32 +16570,72 @@ Value *CodeGenFunction::EmitPPCBuiltinExpr(unsigned BuiltinID, #include "llvm/TargetParser/PPCTargetParser.def" auto GenAIXPPCBuiltinCpuExpr = [&](unsigned SupportMethod, unsigned FieldIdx, nemanjai wrote: This is now a very

[clang] [llvm] Implement a subset of builtin_cpu_supports() features (PR #82809)

2024-03-05 Thread Nemanja Ivanovic via cfe-commits
@@ -141,23 +149,30 @@ PPC_LNX_CPU("power10",47) #define AIX_BUILTIN_PPC_TRUE 1 #define AIX_BUILTIN_PPC_FALSE 0 #define USE_SYS_CONF 2 + #define SYS_CALL 3 // Supported COMPARE_OP values. #define COMP_EQ 0 + #define COMP_GT 1 + #define COMP_GE 2 + #define

[clang] [llvm] [RISCV] Add back SiFive's cdiscard.d.l1 and cflush.d.l1 instructions. (PR #83896)

2024-03-05 Thread Shao-Ce SUN via cfe-commits
sunshaoce wrote: By the way, is there any plan to support `CFLUSH.I.L1` in the future? https://github.com/llvm/llvm-project/pull/83896 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [X86] Add Support for X86 TLSDESC Relocations (PR #83136)

2024-03-05 Thread Phoebe Wang via cfe-commits
https://github.com/phoebewang deleted https://github.com/llvm/llvm-project/pull/83136 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Skip the RequiresExprBodyDecls for lambda dependencies (PR #83997)

2024-03-05 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 edited https://github.com/llvm/llvm-project/pull/83997 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Skip the RequiresExprBodyDecls for lambda dependencies (PR #83997)

2024-03-05 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 edited https://github.com/llvm/llvm-project/pull/83997 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [X86] Add Support for X86 TLSDESC Relocations (PR #83136)

2024-03-05 Thread Phoebe Wang via cfe-commits
@@ -0,0 +1,165 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 4 +; RUN: llc < %s -mtriple=i686-unknown-unknown --relocation-model=pic -enable-tlsdesc | FileCheck %s --check-prefix=X86 +; RUN: llc < %s

[clang] [compiler-rt] [llvm] [InstrFDO][TypeProf] Implement binary instrumentation and profile read/write (PR #66825)

2024-03-05 Thread Mingming Liu via cfe-commits
@@ -1237,6 +1259,101 @@ void InstrLowerer::maybeSetComdat(GlobalVariable *GV, Function *Fn, GV->setLinkage(GlobalValue::InternalLinkage); } +static inline bool shouldRecordVTableAddr(GlobalVariable *GV) { + if (!profDataReferencedByCode(*GV->getParent())) +return

[clang] [compiler-rt] [llvm] [InstrFDO][TypeProf] Implement binary instrumentation and profile read/write (PR #66825)

2024-03-05 Thread Mingming Liu via cfe-commits
@@ -605,6 +703,19 @@ Function* InstrProfSymtab::getFunction(uint64_t FuncMD5Hash) { return nullptr; } +GlobalVariable * +InstrProfSymtab::getGlobalVariable(uint64_t GlobalVariableMD5Hash) { + finalizeSymtab(); minglotus-6 wrote: Indeed. With a DenseMap

[clang] [compiler-rt] [llvm] [InstrFDO][TypeProf] Implement binary instrumentation and profile read/write (PR #66825)

2024-03-05 Thread Mingming Liu via cfe-commits
@@ -538,14 +541,30 @@ Error RawInstrProfReader::readNextHeader(const char *CurrentPos) { template Error RawInstrProfReader::createSymtab(InstrProfSymtab ) { - if (Error E = Symtab.create(StringRef(NamesStart, NamesEnd - NamesStart))) + if (Error E =

[clang] [compiler-rt] [llvm] [InstrFDO][TypeProf] Implement binary instrumentation and profile read/write (PR #66825)

2024-03-05 Thread Mingming Liu via cfe-commits
@@ -1237,6 +1259,101 @@ void InstrLowerer::maybeSetComdat(GlobalVariable *GV, Function *Fn, GV->setLinkage(GlobalValue::InternalLinkage); } +static inline bool shouldRecordVTableAddr(GlobalVariable *GV) { + if (!profDataReferencedByCode(*GV->getParent())) +return

[clang] [compiler-rt] [llvm] [InstrFDO][TypeProf] Implement binary instrumentation and profile read/write (PR #66825)

2024-03-05 Thread Mingming Liu via cfe-commits
@@ -1237,6 +1259,101 @@ void InstrLowerer::maybeSetComdat(GlobalVariable *GV, Function *Fn, GV->setLinkage(GlobalValue::InternalLinkage); } +static inline bool shouldRecordVTableAddr(GlobalVariable *GV) { + if (!profDataReferencedByCode(*GV->getParent())) +return

[clang] [compiler-rt] [llvm] [InstrFDO][TypeProf] Implement binary instrumentation and profile read/write (PR #66825)

2024-03-05 Thread Mingming Liu via cfe-commits
@@ -567,6 +643,21 @@ Error InstrProfSymtab::create(const NameIterRange ) { return Error::success(); } +template +Error InstrProfSymtab::create(const FuncNameIterRange , + const VTableNameIterRange ) { + for (auto Name : FuncIterRange)

[clang] [compiler-rt] [llvm] [InstrFDO][TypeProf] Implement binary instrumentation and profile read/write (PR #66825)

2024-03-05 Thread Mingming Liu via cfe-commits
@@ -560,6 +602,28 @@ Error InstrProfSymtab::addFuncWithName(Function , StringRef PGOFuncName) { return Error::success(); } +uint64_t InstrProfSymtab::getVTableHashFromAddress(uint64_t Address) { + finalizeSymtab(); minglotus-6 wrote: This is to make sure

[clang] [compiler-rt] [llvm] [InstrFDO][TypeProf] Implement binary instrumentation and profile read/write (PR #66825)

2024-03-05 Thread Mingming Liu via cfe-commits
@@ -459,6 +472,16 @@ Error InstrProfSymtab::create(Module , bool InLTO) { if (Error E = addFuncWithName(F, getPGOFuncName(F, InLTO))) return E; } + + SmallVector Types; + for (GlobalVariable : M.globals()) { +if (!G.hasName()) + continue; +

[clang] [compiler-rt] [llvm] [InstrFDO][TypeProf] Implement binary instrumentation and profile read/write (PR #66825)

2024-03-05 Thread Mingming Liu via cfe-commits
https://github.com/minglotus-6 commented: > Here are some things I noticed, haven't looked at the tests yet. @snehasish Thanks for the review! Talking about tests, I wonder if it looks better if I change the current LLVM IR test under `llvm/test/tools/llvm-profdata/` into a compiler-rt test

[clang] [compiler-rt] [llvm] [InstrFDO][TypeProf] Implement binary instrumentation and profile read/write (PR #66825)

2024-03-05 Thread Mingming Liu via cfe-commits
@@ -490,6 +591,23 @@ Error InstrProfSymtab::addFuncWithName(Function , StringRef PGOFuncName) { return Error::success(); } +uint64_t InstrProfSymtab::getVTableHashFromAddress(uint64_t Address) { + finalizeSymtab(); + auto It = lower_bound( + VTableAddrRangeToMD5Map,

[clang] [compiler-rt] [llvm] [InstrFDO][TypeProf] Implement binary instrumentation and profile read/write (PR #66825)

2024-03-05 Thread Mingming Liu via cfe-commits
@@ -16,23 +16,72 @@ #include namespace llvm { -// Visitor class that finds all indirect call. +// Visitor class that finds indirect calls or instructions that gives vtable +// value, depending on Type. struct PGOIndirectCallVisitor : public InstVisitor { + enum class

[clang] [compiler-rt] [llvm] [InstrFDO][TypeProf] Implement binary instrumentation and profile read/write (PR #66825)

2024-03-05 Thread Mingming Liu via cfe-commits
@@ -378,6 +384,13 @@ std::string getPGOFuncName(const Function , bool InLTO, uint64_t Version) { return getPGOFuncName(F.getName(), GlobalValue::ExternalLinkage, ""); } +std::string getPGOName(const GlobalVariable , bool InLTO) { + // PGONameMetadata should be set by

[clang] [compiler-rt] [llvm] [InstrFDO][TypeProf] Implement binary instrumentation and profile read/write (PR #66825)

2024-03-05 Thread Mingming Liu via cfe-commits
@@ -1237,6 +1259,101 @@ void InstrLowerer::maybeSetComdat(GlobalVariable *GV, Function *Fn, GV->setLinkage(GlobalValue::InternalLinkage); } +static inline bool shouldRecordVTableAddr(GlobalVariable *GV) { + if (!profDataReferencedByCode(*GV->getParent())) +return

[clang] [compiler-rt] [llvm] [InstrFDO][TypeProf] Implement binary instrumentation and profile read/write (PR #66825)

2024-03-05 Thread Mingming Liu via cfe-commits
https://github.com/minglotus-6 edited https://github.com/llvm/llvm-project/pull/66825 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [llvm] [InstrFDO][TypeProf] Implement binary instrumentation and profile read/write (PR #66825)

2024-03-05 Thread Mingming Liu via cfe-commits
@@ -429,20 +439,36 @@ uint64_t ComputeHash(StringRef K); class InstrProfSymtab { public: using AddrHashMap = std::vector>; + using RangeHashMap = + std::vector, uint64_t>>; minglotus-6 wrote: done, and making the struct definition private to class

[clang] [NFC][Docs] Documenting __builtin_cpu_supports. (PR #84098)

2024-03-05 Thread Fangrui Song via cfe-commits
@@ -2799,6 +2799,34 @@ counter's true frequency will need to be provided by the user. Query for this feature with ``__has_builtin(__builtin_readsteadycounter)``. +``__builtin_cpu_supports`` +-- + +**Syntax**: + +.. code-block:: c++ + + int

[clang] [NFC][Docs] Documenting __builtin_cpu_supports. (PR #84098)

2024-03-05 Thread Fangrui Song via cfe-commits
@@ -2799,6 +2799,34 @@ counter's true frequency will need to be provided by the user. Query for this feature with ``__has_builtin(__builtin_readsteadycounter)``. +``__builtin_cpu_supports`` +-- + +**Syntax**: + +.. code-block:: c++ + + int

[clang] [NFC][Docs] Documenting __builtin_cpu_supports. (PR #84098)

2024-03-05 Thread Fangrui Song via cfe-commits
@@ -2799,6 +2799,34 @@ counter's true frequency will need to be provided by the user. Query for this feature with ``__has_builtin(__builtin_readsteadycounter)``. +``__builtin_cpu_supports`` +-- + +**Syntax**: + +.. code-block:: c++ + + int

[clang] [NFC][Docs] Documenting __builtin_cpu_supports. (PR #84098)

2024-03-05 Thread Fangrui Song via cfe-commits
@@ -2799,6 +2799,34 @@ counter's true frequency will need to be provided by the user. Query for this feature with ``__has_builtin(__builtin_readsteadycounter)``. +``__builtin_cpu_supports`` +-- + +**Syntax**: + +.. code-block:: c++ + + int

[clang] [NFC][Docs] Documenting __builtin_cpu_supports. (PR #84098)

2024-03-05 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/84098 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][Docs] Documenting __builtin_cpu_supports. (PR #84098)

2024-03-05 Thread Fangrui Song via cfe-commits
@@ -2799,6 +2799,34 @@ counter's true frequency will need to be provided by the user. Query for this feature with ``__has_builtin(__builtin_readsteadycounter)``. +``__builtin_cpu_supports`` +-- + +**Syntax**: + +.. code-block:: c++ + + int

[clang] [NFC][Docs] Documenting __builtin_cpu_supports. (PR #84098)

2024-03-05 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/84098 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [UBSAN] Preserve ubsan code with ubsan-unique-traps (PR #83470)

2024-03-05 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: > If you are going to remove this feature, I would rather you simply revert the > old commit. There is no point leaving the flag in at this point. > > I had explored earlier dealing with the optimization at a later time in the > compilation pipeline, but got nowhere and this

[clang] [clang][Sema] Skip the RequiresExprBodyDecls for lambda dependencies (PR #83997)

2024-03-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Younan Zhang (zyn0217) Changes The dependency of a lambda inside of a `RequiresExprBodyDecl` was previously affected by its parent, e.g., `ClassTemplateSpecializationDecl`. This made the lambda always dependent regardless of the template

[clang] [clang][Sema] Skip the RequiresExprBodyDecls for lambda dependencies (PR #83997)

2024-03-05 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 ready_for_review https://github.com/llvm/llvm-project/pull/83997 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Skip the RequiresExprBodyDecls for lambda dependencies (PR #83997)

2024-03-05 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/83997 >From 69414d7352b170f6fcff22c6f5dfa91cc76b0b58 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Tue, 5 Mar 2024 19:56:59 +0800 Subject: [PATCH 1/2] gh56556 --- clang/lib/Sema/TreeTransform.h | 6 -- 1

[clang] [llvm] [Driver] Default -msmall-data-limit= to 0 and clean up code (PR #83093)

2024-03-05 Thread Fangrui Song via cfe-commits
MaskRay wrote: Ping:) https://github.com/llvm/llvm-project/pull/83093 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Skip the RequiresExprBodyDecls for lambda dependencies (PR #83997)

2024-03-05 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 edited https://github.com/llvm/llvm-project/pull/83997 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] gh56556 (PR #83997)

2024-03-05 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 edited https://github.com/llvm/llvm-project/pull/83997 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Use timeTraceAsyncProfilerBegin for Source span (PR #83961)

2024-03-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-support Author: Takuto Ikuta (atetubou) Changes This fixes incorrect trace for https://github.com/llvm/llvm-project/issues/56554. This shows trace like https://ui.perfetto.dev/#!/?s=aa809778dc50f2b155b062317fa18bbe2bb2fb9175e6282add8121c7c178214e

[clang] [llvm] Use timeTraceAsyncProfilerBegin for Source span (PR #83961)

2024-03-05 Thread Takuto Ikuta via cfe-commits
https://github.com/atetubou ready_for_review https://github.com/llvm/llvm-project/pull/83961 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Use timeTraceAsyncProfilerBegin for Source span (PR #83961)

2024-03-05 Thread Takuto Ikuta via cfe-commits
https://github.com/atetubou edited https://github.com/llvm/llvm-project/pull/83961 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] gh56556 (PR #83997)

2024-03-05 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/83997 >From 69414d7352b170f6fcff22c6f5dfa91cc76b0b58 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Tue, 5 Mar 2024 19:56:59 +0800 Subject: [PATCH 1/2] gh56556 --- clang/lib/Sema/TreeTransform.h | 6 -- 1

[clang] [Driver,CrossWindows] Remove -isystem-after (PR #84121)

2024-03-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver @llvm/pr-subscribers-clang Author: Fangrui Song (MaskRay) Changes Commit 88879e6559a3ae8593e32568900707b1dbf3f060 added -isystem-after (not in GCC) for CrossWindows (see 543a78b55ee993c2977fc2984f278f7ec0125765; *-windows-itanium). I have

[clang] [Driver,CrossWindows] Remove -isystem-after (PR #84121)

2024-03-05 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay created https://github.com/llvm/llvm-project/pull/84121 Commit 88879e6559a3ae8593e32568900707b1dbf3f060 added -isystem-after (not in GCC) for CrossWindows (see 543a78b55ee993c2977fc2984f278f7ec0125765; *-windows-itanium). I have heard two reports that the documented

[clang] [OpenMP] Parse and Sema support for declare target in local scope (PR #83223)

2024-03-05 Thread Sandeep Kosuri via cfe-commits
https://github.com/sandeepkosuri updated https://github.com/llvm/llvm-project/pull/83223 >From cbf1b4409e379309ae3d942b3dbec0964b9ee0d1 Mon Sep 17 00:00:00 2001 From: Sandeep Kosuri Date: Tue, 27 Feb 2024 23:19:41 -0600 Subject: [PATCH 1/3] [OpenMP] Parse and Sema support for declare target in

[clang] [UBSAN] Preserve ubsan code with ubsan-unique-traps (PR #83470)

2024-03-05 Thread Oskar Wirga via cfe-commits
https://github.com/oskarwirga requested changes to this pull request. If you are going to remove this feature, I would rather you simply revert the old commit. There is no point leaving the flag in at this point. I had explored earlier dealing with the optimization at a later time in the

[clang] [clang][Sema] Warn on self move for inlined static cast (PR #76646)

2024-03-05 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr approved this pull request. Much better, thanks. https://github.com/llvm/llvm-project/pull/76646 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Use TimeTraceProfilerEntry for Source span (PR #83961)

2024-03-05 Thread Takuto Ikuta via cfe-commits
https://github.com/atetubou edited https://github.com/llvm/llvm-project/pull/83961 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Use TimeTraceProfilerEntry for Source span (PR #83961)

2024-03-05 Thread Takuto Ikuta via cfe-commits
https://github.com/atetubou updated https://github.com/llvm/llvm-project/pull/83961 >From 90ebde07f7fa426a37dd4bdc362e1a809aaf0844 Mon Sep 17 00:00:00 2001 From: Takuto Ikuta Date: Mon, 4 Mar 2024 19:12:31 +0900 Subject: [PATCH 1/2] Expose TimeTraceProfiler for Async Events ---

[clang] [llvm] [RISCV] Add back SiFive's cdiscard.d.l1 and cflush.d.l1 instructions. (PR #83896)

2024-03-05 Thread Craig Topper via cfe-commits
https://github.com/topperc updated https://github.com/llvm/llvm-project/pull/83896 >From 9434f834c4d48559aeec94403c927f48b15763e3 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Mon, 4 Mar 2024 11:24:34 -0800 Subject: [PATCH 1/4] [RISCV] Add back SiFive's cdiscard.d.l1 and cflush.d.l1

[clang] [OpenMP] Parse and Sema support for declare target in local scope (PR #83223)

2024-03-05 Thread Sandeep Kosuri via cfe-commits
@@ -11326,6 +11326,8 @@ def err_omp_device_type_mismatch : Error< def err_omp_wrong_device_function_call : Error< "function with 'device_type(%0)' is not available on %select{device|host}1">; def note_omp_marked_device_type_here : Note<"marked as 'device_type(%0)' here">;

[clang] Revert "[Driver] Default riscv*- triples to -fdebug-default-version=4" (PR #84119)

2024-03-05 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/84119 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Revert "[Driver] Default riscv*- triples to -fdebug-default-version=4" (PR #84119)

2024-03-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Fangrui Song (MaskRay) Changes This reverts commit bbc0f99f3bc96f1db16f649fc21dd18e5b0918f6 (https://reviews.llvm.org/D157663). With this change, the next major release 19.1 will generate R_RISCV_SET_ULEB128/R_RISCV_SUB_ULEB128

[clang] Revert "[Driver] Default riscv*- triples to -fdebug-default-version=4" (PR #84119)

2024-03-05 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay created https://github.com/llvm/llvm-project/pull/84119 This reverts commit bbc0f99f3bc96f1db16f649fc21dd18e5b0918f6 (https://reviews.llvm.org/D157663). With this change, the next major release 19.1 will generate R_RISCV_SET_ULEB128/R_RISCV_SUB_ULEB128 relocations,

[clang] [llvm] [openmp] [libomptarget] Build plugins-nextgen for SystemZ (PR #83978)

2024-03-05 Thread Joseph Huber via cfe-commits
jhuber6 wrote: Please format before landing https://github.com/llvm/llvm-project/pull/83978 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [openmp] [libomptarget] Build plugins-nextgen for SystemZ (PR #83978)

2024-03-05 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 approved this pull request. https://github.com/llvm/llvm-project/pull/83978 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] clangd: Show argument names for function pointer struct fields (PR #69011)

2024-03-05 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 closed https://github.com/llvm/llvm-project/pull/69011 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] 7bad74e - [clangd] Show argument names for function pointer struct fields (#69011)

2024-03-05 Thread via cfe-commits
Author: Qwinci Date: 2024-03-05T23:33:55-05:00 New Revision: 7bad74e66756ca2fd1fe4f5864e7123fb4553d78 URL: https://github.com/llvm/llvm-project/commit/7bad74e66756ca2fd1fe4f5864e7123fb4553d78 DIFF: https://github.com/llvm/llvm-project/commit/7bad74e66756ca2fd1fe4f5864e7123fb4553d78.diff LOG:

[clang] [clang-tools-extra] clangd: Show argument names for function pointer struct fields (PR #69011)

2024-03-05 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 approved this pull request. Thanks! https://github.com/llvm/llvm-project/pull/69011 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] RISCV vector calling convention (1/2) (PR #77560)

2024-03-05 Thread Brandon Wu via cfe-commits
@@ -3439,6 +3439,8 @@ StringRef FunctionType::getNameForCallConv(CallingConv CC) { case CC_PreserveAll: return "preserve_all"; case CC_M68kRTD: return "m68k_rtd"; case CC_PreserveNone: return "preserve_none"; + case CC_RISCVVectorCall: 4vtomat wrote:

[clang-tools-extra] [clangd] Remove calls to getFileLoc() in declToSym() (PR #83532)

2024-03-05 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 closed https://github.com/llvm/llvm-project/pull/83532 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] d1aec79 - [clangd] Remove calls to getFileLoc() in declToSym() (#83532)

2024-03-05 Thread via cfe-commits
Author: Nathan Ridge Date: 2024-03-05T23:12:43-05:00 New Revision: d1aec79a2ce077e49da7699c4ca2dee239d0a249 URL: https://github.com/llvm/llvm-project/commit/d1aec79a2ce077e49da7699c4ca2dee239d0a249 DIFF: https://github.com/llvm/llvm-project/commit/d1aec79a2ce077e49da7699c4ca2dee239d0a249.diff

[clang-tools-extra] [clangd] Make all calls to format::getStyle() go through getFormatStyleForFile() (PR #82948)

2024-03-05 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 closed https://github.com/llvm/llvm-project/pull/82948 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] 5549b01 - [clangd] Make all calls to format::getStyle() go through getFormatStyleForFile() (#82948)

2024-03-05 Thread via cfe-commits
Author: Nathan Ridge Date: 2024-03-05T23:11:29-05:00 New Revision: 5549b0173661155d4ca9acf4958fe6dce34c2cd5 URL: https://github.com/llvm/llvm-project/commit/5549b0173661155d4ca9acf4958fe6dce34c2cd5 DIFF: https://github.com/llvm/llvm-project/commit/5549b0173661155d4ca9acf4958fe6dce34c2cd5.diff

[clang] [AMDGPU] Introduce 'amdgpu_num_workgroups_{xyz}' builtin (PR #83927)

2024-03-05 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > I think we would be better off teaching an IR optimizer pass to recognize the > divide pattern and remap it to the load from the new location, rather than > forcing the complexity into every frontend That's fair. I would've argued that this version should've been the builtin

[clang] [CUDA] Correctly set CUDA default architecture (PR #84017)

2024-03-05 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 closed https://github.com/llvm/llvm-project/pull/84017 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 433b711 - [CUDA] Correctly set CUDA default architecture (#84017)

2024-03-05 Thread via cfe-commits
Author: Joseph Huber Date: 2024-03-05T22:03:00-06:00 New Revision: 433b71188da9649a9040f0db5338c65369fa3e90 URL: https://github.com/llvm/llvm-project/commit/433b71188da9649a9040f0db5338c65369fa3e90 DIFF: https://github.com/llvm/llvm-project/commit/433b71188da9649a9040f0db5338c65369fa3e90.diff

[clang] [llvm] [AMDGPU] Implement 'llvm.get.fpenv' and 'llvm.set.fpenv' (PR #83906)

2024-03-05 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/83906 >From 1ff47a0c18e5f163bad9c0bd45c987ff7a33ab83 Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Fri, 1 Mar 2024 15:28:32 -0600 Subject: [PATCH 1/2] [AMDGPU] Implement 'llvm.get.fpenv' and 'llvm.set.fpenv'

[clang] [llvm] [AMDGPU] Implement 'llvm.get.fpenv' and 'llvm.set.fpenv' (PR #83906)

2024-03-05 Thread Joseph Huber via cfe-commits
@@ -6826,6 +6826,10 @@ def warn_floatingpoint_eq : Warning< "comparing floating point with == or != is unsafe">, InGroup>, DefaultIgnore; +def warn_fenv_access : Warning< + "floating point environment access without #pragma STDC FENV_ACCESS set ON">, + InGroup>;

[clang] [llvm] [AMDGPU] Implement 'llvm.get.fpenv' and 'llvm.set.fpenv' (PR #83906)

2024-03-05 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/83906 >From 1ff47a0c18e5f163bad9c0bd45c987ff7a33ab83 Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Fri, 1 Mar 2024 15:28:32 -0600 Subject: [PATCH] [AMDGPU] Implement 'llvm.get.fpenv' and 'llvm.set.fpenv' Summary:

[clang] [openmp] [OpenMP] Respect LLVM per-target install directories (PR #83282)

2024-03-05 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > Fixed the issue > [0fa04b6](https://github.com/llvm/llvm-project/commit/0fa04b6e2cd2169a8e3d22ae879394dbf07c0466) > Unrelated to building as projects. Hah, I probably should've noticed that. Explains why I didn't notice because I always have tests enabled.

[clang] [openmp] [OpenMP] Respect LLVM per-target install directories (PR #83282)

2024-03-05 Thread Ye Luo via cfe-commits
ye-luo wrote: Fixed the issue https://github.com/llvm/llvm-project/commit/0fa04b6e2cd2169a8e3d22ae879394dbf07c0466 Unrelated to building as projects. https://github.com/llvm/llvm-project/pull/83282 ___ cfe-commits mailing list

[clang] [llvm] [RISCV] RISCV vector calling convention (1/2) (PR #77560)

2024-03-05 Thread Craig Topper via cfe-commits
@@ -3439,6 +3439,8 @@ StringRef FunctionType::getNameForCallConv(CallingConv CC) { case CC_PreserveAll: return "preserve_all"; case CC_M68kRTD: return "m68k_rtd"; case CC_PreserveNone: return "preserve_none"; + case CC_RISCVVectorCall: topperc wrote:

[clang] [llvm] [RISCV] RISCV vector calling convention (1/2) (PR #77560)

2024-03-05 Thread Craig Topper via cfe-commits
@@ -74,6 +74,8 @@ unsigned CodeGenTypes::ClangCallConvToLLVMCallConv(CallingConv CC) { case CC_SwiftAsync: return llvm::CallingConv::SwiftTail; case CC_M68kRTD: return llvm::CallingConv::M68k_RTD; case CC_PreserveNone: return llvm::CallingConv::PreserveNone; + case

[clang] [clang][RISCV] Enable RVV with function attribute __attribute__((target("arch=+v"))) (PR #83674)

2024-03-05 Thread Brandon Wu via cfe-commits
4vtomat wrote: Rebase. https://github.com/llvm/llvm-project/pull/83674 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][RISCV] Enable RVV with function attribute __attribute__((target("arch=+v"))) (PR #83674)

2024-03-05 Thread Brandon Wu via cfe-commits
https://github.com/4vtomat updated https://github.com/llvm/llvm-project/pull/83674 >From faab3d0d9163e99185fb6a2d3efd21549ed33e00 Mon Sep 17 00:00:00 2001 From: Brandon Wu Date: Fri, 1 Mar 2024 09:52:35 -0800 Subject: [PATCH 1/3] [clang][RISCV] Enable RVV with function attribute

[clang] [NFC][Docs] Documenting __builtin_cpu_supports. (PR #84098)

2024-03-05 Thread Jon Roelofs via cfe-commits
@@ -2799,6 +2799,34 @@ counter's true frequency will need to be provided by the user. Query for this feature with ``__has_builtin(__builtin_readsteadycounter)``. +``__builtin_cpu_supports`` +-- + +**Syntax**: + +.. code-block:: c++ + + int

[clang] [NFC][Docs] Documenting __builtin_cpu_supports. (PR #84098)

2024-03-05 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs approved this pull request. Some small nits, but LGTM. https://github.com/llvm/llvm-project/pull/84098 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][Docs] Documenting __builtin_cpu_supports. (PR #84098)

2024-03-05 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs edited https://github.com/llvm/llvm-project/pull/84098 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [lld] [lldb] [llvm] [mlir] Rename llvm::ThreadPool -> llvm::DefaultThreadPool (NFC) (PR #83702)

2024-03-05 Thread Mehdi Amini via cfe-commits
@@ -104,7 +104,7 @@ static std::recursive_mutex *g_debugger_list_mutex_ptr = nullptr; // NOTE: intentional leak to avoid issues with C++ destructor chain static Debugger::DebuggerList *g_debugger_list_ptr = nullptr; // NOTE: intentional leak to avoid issues with C++

  1   2   3   4   5   6   >