[clang] [clang][NFC] Trim license header comments to 81 characters (PR #82919)

2024-03-04 Thread Balazs Benics via cfe-commits
steakhal wrote: > +1 to @pogo59's comment about pruning complete paths - I suspect they're in > the minority. Might be worth checking whether the `===` at the start and end > is markup for any particular thing (I /think/ the `-*- C++ -*-` is load > bearing for some editors to inform them this

[clang] [analyzer][NFC] Remove dead code (PR #83968)

2024-03-04 Thread Balazs Benics via cfe-commits
steakhal wrote: Please merge it once approved. https://github.com/llvm/llvm-project/pull/83968 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer][NFC] Remove dead code (PR #83968)

2024-03-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Balazs Benics (steakhal) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/83968.diff 3 Files Affected: - (modified) clang/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h (-6) -

[clang] [analyzer][NFC] Remove dead code (PR #83968)

2024-03-04 Thread Balazs Benics via cfe-commits
https://github.com/steakhal created https://github.com/llvm/llvm-project/pull/83968 None >From 3a7f862398a5168028f2d3d66d6b8986e7d528da Mon Sep 17 00:00:00 2001 From: Balazs Benics Date: Tue, 5 Mar 2024 08:47:56 +0100 Subject: [PATCH] [analyzer][NFC] Remove dead code ---

[clang] [clang][analyzer] Improve documentation of StreamChecker (NFC). (PR #83858)

2024-03-04 Thread Balázs Kéri via cfe-commits
@@ -3020,44 +3020,82 @@ Check for misuses of stream APIs. Check for misuses of stream APIs: ``fopen, fcl alpha.unix.Stream (C) " -Check stream handling functions: ``fopen, tmpfile, fclose, fread, fwrite, fseek, ftell, rewind, fgetpos,`` -``fsetpos,

[clang] [clang][analyzer] Improve documentation of StreamChecker (NFC). (PR #83858)

2024-03-04 Thread Balázs Kéri via cfe-commits
@@ -3020,44 +3020,82 @@ Check for misuses of stream APIs. Check for misuses of stream APIs: ``fopen, fcl alpha.unix.Stream (C) " -Check stream handling functions: ``fopen, tmpfile, fclose, fread, fwrite, fseek, ftell, rewind, fgetpos,`` -``fsetpos,

[clang] [analyzer] Fix crash on dereference invalid return value of getAdjustedParameterIndex() (PR #83585)

2024-03-04 Thread via cfe-commits
tomasz-kaminski-sonarsource wrote: > Thanks for your help very much.I only fixed the symptoms of this bug without > spending much time to find the root cause. I feel ashamed. There is nothing to be ashamed of. You have spent the time to debug the crash, and localize the use of non-engaged

[clang] Update Clang.cpp (PR #77882)

2024-03-04 Thread Fangrui Song via cfe-commits
MaskRay wrote: The code has been removed by #77711 https://github.com/llvm/llvm-project/pull/77882 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Update Clang.cpp (PR #77882)

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

[clang] [clang] Refactor Builtins.def to be a tablegen file (PR #68324)

2024-03-04 Thread Francesco Petrogalli via cfe-commits
fpetrogalli wrote: @philnik777 - do you plan to use the TD definitions of the builtins anywhere else in the compiler? Francesco https://github.com/llvm/llvm-project/pull/68324 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang][Builtins] Parse clang extended vectors types. (PR #83584)

2024-03-04 Thread Francesco Petrogalli via cfe-commits
https://github.com/fpetrogalli closed https://github.com/llvm/llvm-project/pull/83584 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 9b672de - [clang][Builtins] Parse clang extended vectors types. (#83584)

2024-03-04 Thread via cfe-commits
Author: Francesco Petrogalli Date: 2024-03-05T07:51:35+01:00 New Revision: 9b672de9976084872fbca764898ed722dea1dd9b URL: https://github.com/llvm/llvm-project/commit/9b672de9976084872fbca764898ed722dea1dd9b DIFF:

[clang] [clang][Builtins] Parse clang extended vectors types. (PR #83584)

2024-03-04 Thread Francesco Petrogalli via cfe-commits
https://github.com/fpetrogalli edited https://github.com/llvm/llvm-project/pull/83584 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [X86_64] fix empty structure vaarg in c++ (PR #77907)

2024-03-04 Thread via cfe-commits
https://github.com/hstk30-hw updated https://github.com/llvm/llvm-project/pull/77907 >From aa02306347026829c621a637124fae900de18cbc Mon Sep 17 00:00:00 2001 From: Longsheng Mou Date: Fri, 12 Jan 2024 18:24:08 +0800 Subject: [PATCH] [X86_64] fix empty structure vaarg in c++ SizeInBytes of

[clang] [clang][modules] Headers meant to be included multiple times can be completely invisible in clang module builds (PR #83660)

2024-03-04 Thread Ian Anderson via cfe-commits
ian-twilightcoder wrote: > Thanks to @Bigcheese for helping with this patch. > > https://reviews.llvm.org/D26267 looks like the most recent significant update > to this code that we could find. It had an additional allowance where clang > headers that were _not_ marked `textual` could be

[clang-tools-extra] [clang-tidy] fix false positive in cppcoreguidelines-missing-std-forward (PR #77056)

2024-03-04 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: > Capture by reference makes t in parameter same with it in lambda body That is definitely wrong. It will get an error for this code if address sanitize is enabled. ```c++ #include #include template auto f(T &) { return [&]() { return std::forward(t); }; }

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

2024-03-04 Thread Snehasish Kumar 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>>; private: StringRef Data; uint64_t Address = 0; - // Unique name strings. + // Unique

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

2024-03-04 Thread Snehasish Kumar via cfe-commits
@@ -560,6 +602,28 @@ Error InstrProfSymtab::addFuncWithName(Function , StringRef PGOFuncName) { return Error::success(); } +uint64_t InstrProfSymtab::getVTableHashFromAddress(uint64_t Address) { + finalizeSymtab(); snehasish wrote: Like the lookup for

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

2024-03-04 Thread Snehasish Kumar via cfe-commits
@@ -429,20 +439,36 @@ uint64_t ComputeHash(StringRef K); class InstrProfSymtab { public: using AddrHashMap = std::vector>; + using RangeHashMap = snehasish wrote: Hmm, it's a little strange to have HashMap in the name and the underlying data structure is

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

2024-03-04 Thread Snehasish Kumar 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-04 Thread Snehasish Kumar 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-04 Thread Snehasish Kumar via cfe-commits
@@ -327,6 +327,11 @@ extern cl::opt PGOViewCounts; // Defined in Analysis/BlockFrequencyInfo.cpp: -view-bfi-func-name= extern cl::opt ViewBlockFreqFuncName; +extern cl::opt DebugInfoCorrelate; snehasish wrote: Add a comment for this like the ones above.

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

2024-03-04 Thread Snehasish Kumar via cfe-commits
@@ -496,32 +532,70 @@ class InstrProfSymtab { /// Create InstrProfSymtab from a set of names iteratable from /// \p IterRange. This interface is used by IndexedProfReader. - template Error create(const NameIterRange ); - - /// Update the symtab by adding \p FuncName

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

2024-03-04 Thread Snehasish Kumar 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-04 Thread Snehasish Kumar 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>>; snehasish wrote: Can you change the element type to a structure with 3

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

2024-03-04 Thread Snehasish Kumar 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-04 Thread Snehasish Kumar 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-04 Thread Snehasish Kumar 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-04 Thread Snehasish Kumar 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-04 Thread Snehasish Kumar 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-04 Thread Snehasish Kumar via cfe-commits
https://github.com/snehasish 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-04 Thread Snehasish Kumar via cfe-commits
https://github.com/snehasish commented: Here are some things I noticed, haven't looked at the tests yet. https://github.com/llvm/llvm-project/pull/66825 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2024-03-04 Thread Snehasish Kumar 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-04 Thread Snehasish Kumar via cfe-commits
@@ -605,6 +703,19 @@ Function* InstrProfSymtab::getFunction(uint64_t FuncMD5Hash) { return nullptr; } +GlobalVariable * +InstrProfSymtab::getGlobalVariable(uint64_t GlobalVariableMD5Hash) { + finalizeSymtab(); snehasish wrote: Why do we need to

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

2024-03-04 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-04 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] [clang][analyzer] Improve documentation of StreamChecker (NFC). (PR #83858)

2024-03-04 Thread Ben Shi via cfe-commits
@@ -3020,44 +3020,82 @@ Check for misuses of stream APIs. Check for misuses of stream APIs: ``fopen, fcl alpha.unix.Stream (C) " -Check stream handling functions: ``fopen, tmpfile, fclose, fread, fwrite, fseek, ftell, rewind, fgetpos,`` -``fsetpos,

[clang] [clang][analyzer] Improve documentation of StreamChecker (NFC). (PR #83858)

2024-03-04 Thread Ben Shi via cfe-commits
@@ -3020,44 +3020,82 @@ Check for misuses of stream APIs. Check for misuses of stream APIs: ``fopen, fcl alpha.unix.Stream (C) " -Check stream handling functions: ``fopen, tmpfile, fclose, fread, fwrite, fseek, ftell, rewind, fgetpos,`` -``fsetpos,

[clang] [clang][analyzer] Improve documentation of StreamChecker (NFC). (PR #83858)

2024-03-04 Thread Ben Shi via cfe-commits
https://github.com/benshi001 approved this pull request. https://github.com/llvm/llvm-project/pull/83858 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Improve documentation of StreamChecker (NFC). (PR #83858)

2024-03-04 Thread Ben Shi via cfe-commits
@@ -3020,44 +3020,82 @@ Check for misuses of stream APIs. Check for misuses of stream APIs: ``fopen, fcl alpha.unix.Stream (C) " -Check stream handling functions: ``fopen, tmpfile, fclose, fread, fwrite, fseek, ftell, rewind, fgetpos,`` -``fsetpos,

[clang] [clang][analyzer] Improve documentation of StreamChecker (NFC). (PR #83858)

2024-03-04 Thread Ben Shi via cfe-commits
@@ -3020,44 +3020,82 @@ Check for misuses of stream APIs. Check for misuses of stream APIs: ``fopen, fcl alpha.unix.Stream (C) " -Check stream handling functions: ``fopen, tmpfile, fclose, fread, fwrite, fseek, ftell, rewind, fgetpos,`` -``fsetpos,

[clang] [clang][analyzer] Improve documentation of StreamChecker (NFC). (PR #83858)

2024-03-04 Thread Ben Shi via cfe-commits
https://github.com/benshi001 edited https://github.com/llvm/llvm-project/pull/83858 ___ 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-04 Thread Takuto Ikuta via cfe-commits
https://github.com/atetubou updated https://github.com/llvm/llvm-project/pull/83961 >From 9a4911ee0732abbe770b98396e166a4d95bc0c95 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 overlapping spans ---

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

2024-03-04 Thread Takuto Ikuta via cfe-commits
https://github.com/atetubou created https://github.com/llvm/llvm-project/pull/83961 This fixes incorrect trace for https://github.com/llvm/llvm-project/issues/56554. https://github.com/llvm/llvm-project/pull/83778 is preparing PR. >From 9a4911ee0732abbe770b98396e166a4d95bc0c95 Mon Sep 17

[clang] Add support for builtin_verbose_trap (PR #79230)

2024-03-04 Thread Akira Hatanaka via cfe-commits
https://github.com/ahatanak updated https://github.com/llvm/llvm-project/pull/79230 >From 678cd8ea37f1d02c70fd09b7107542c8301c3bd2 Mon Sep 17 00:00:00 2001 From: Akira Hatanaka Date: Tue, 16 Jan 2024 13:18:09 -0800 Subject: [PATCH 1/9] Add support for builtin_verbose_trap The builtin causes

[clang] Add support for builtin_verbose_trap (PR #79230)

2024-03-04 Thread Akira Hatanaka via cfe-commits
@@ -0,0 +1,49 @@ +// RUN: %clang_cc1 -triple arm64-apple-ios -std=c++20 -emit-llvm -debug-info-kind=limited %s -o - | FileCheck %s + +// CHECK-LABEL: define void @_Z2f0v() +// CHECK: call void @llvm.trap(), !dbg ![[LOC17:.*]] + +// CHECK-LABEL: define void @_Z2f1v() +// CHECK:

[clang] [HLSL] Add -HV option translation to clang-dxc.exe (PR #83938)

2024-03-04 Thread Justin Bogner via cfe-commits
@@ -8545,6 +8545,10 @@ def dxc_entrypoint : Option<["--", "/", "-"], "E", KIND_JOINED_OR_SEPARATE>, Group, Visibility<[DXCOption]>, HelpText<"Entry point name">; +def dxc_hlsl_version : Option<["--", "/", "-"],

[clang] [HLSL] Add -HV option translation to clang-dxc.exe (PR #83938)

2024-03-04 Thread Justin Bogner via cfe-commits
@@ -0,0 +1,13 @@ +// RUN: %clang_dxc -T lib_6_4 -HV 2016 %s 2>&1 -### | FileCheck -check-prefix=2016 %s +// RUN: %clang_dxc -T lib_6_4 -HV 2017 %s 2>&1 -### | FileCheck -check-prefix=2017 %s +// RUN: %clang_dxc -T lib_6_4 -HV 2018 %s 2>&1 -### | FileCheck

[clang] cec2073 - [clang][Interp] Diagnose comparisions against weak function pointers

2024-03-04 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-03-05T05:44:09+01:00 New Revision: cec2073f8e82c2d72a7246300aaa7b2a85ca4012 URL: https://github.com/llvm/llvm-project/commit/cec2073f8e82c2d72a7246300aaa7b2a85ca4012 DIFF: https://github.com/llvm/llvm-project/commit/cec2073f8e82c2d72a7246300aaa7b2a85ca4012.diff

[clang] [Clang][Sema] placement new initializes typedef array with correct size (PR #83124)

2024-03-04 Thread via cfe-commits
mahtohappy wrote: Hi @shafik @cor3ntin @AaronBallman @erichkeane @Endilll Please review this. Thank you. https://github.com/llvm/llvm-project/pull/83124 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] Add support for builtin_verbose_trap (PR #79230)

2024-03-04 Thread Akira Hatanaka via cfe-commits
@@ -3452,6 +3452,18 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID, case Builtin::BI__builtin_trap: EmitTrapCall(Intrinsic::trap); return RValue::get(nullptr); + case Builtin::BI__builtin_verbose_trap: { +llvm::DILocation

[clang] [Fuchsia] Include baremetal ARM builtins and libc (PR #83949)

2024-03-04 Thread Paul Kirth via cfe-commits
@@ -300,10 +300,43 @@ if(FUCHSIA_SDK) set(LLVM_RUNTIME_MULTILIB_hwasan+noexcept_TARGETS "aarch64-unknown-fuchsia;riscv64-unknown-fuchsia" CACHE STRING "") endif() +foreach(target armv6m-unknown-eabi) + list(APPEND BUILTIN_TARGETS "${target}") +

[clang] [Fuchsia] Include baremetal ARM builtins and libc (PR #83949)

2024-03-04 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi approved this pull request. LGTM other than the nit. https://github.com/llvm/llvm-project/pull/83949 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Fuchsia] Include baremetal ARM builtins and libc (PR #83949)

2024-03-04 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi edited https://github.com/llvm/llvm-project/pull/83949 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [CMAKE] Enable FatLTO as a build option for LLVM (PR #80480)

2024-03-04 Thread Paul Kirth via cfe-commits
@@ -1621,8 +1621,15 @@ function(add_unittest test_suite test_name) # The runtime benefits of LTO don't outweight the compile time costs for tests. if(LLVM_ENABLE_LTO) if((UNIX OR MINGW) AND LINKER_IS_LLD) - set_property(TARGET ${test_name} APPEND_STRING PROPERTY

[clang] [Fuchsia] Include baremetal ARM builtins and libc (PR #83949)

2024-03-04 Thread via cfe-commits
https://github.com/PiJoules approved this pull request. https://github.com/llvm/llvm-project/pull/83949 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Doc][HLSL] Add documentation for root signature. (PR #83933)

2024-03-04 Thread Chris B via cfe-commits
@@ -0,0 +1,210 @@ + +HLSL Root Signatures + + +.. contents:: + :local: + +Usage += + +In HLSL, the `root signature +`_ +defines what types of resources are

[clang] [llvm] [CMAKE] Enable FatLTO as a build option for LLVM (PR #80480)

2024-03-04 Thread Petr Hosek via cfe-commits
@@ -1621,8 +1621,15 @@ function(add_unittest test_suite test_name) # The runtime benefits of LTO don't outweight the compile time costs for tests. if(LLVM_ENABLE_LTO) if((UNIX OR MINGW) AND LINKER_IS_LLD) - set_property(TARGET ${test_name} APPEND_STRING PROPERTY

[clang] [llvm] [CMAKE] Enable FatLTO as a build option for LLVM (PR #80480)

2024-03-04 Thread Petr Hosek via cfe-commits
@@ -1251,6 +1253,10 @@ elseif(LLVM_ENABLE_LTO) endif() endif() +if(LLVM_ENABLE_FATLTO AND (FUCHSIA OR UNIX)) +append("-ffat-lto-objects" CMAKE_EXE_LINKER_FLAGS CMAKE_SHARED_LINKER_FLAGS) petrhosek wrote: I'd also include the flag in

[clang] [llvm] [InstallAPI] Collect global functions (PR #83952)

2024-03-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Cyndy Ishida (cyndyishida) Changes * Include whether functions are inlinable as they impact whether to add them into the tbd file and for future verification. * Fix how clang arguments got passed along, previously spacing was passed along

[clang] [llvm] [InstallAPI] Collect global functions (PR #83952)

2024-03-04 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida created https://github.com/llvm/llvm-project/pull/83952 * Include whether functions are inlinable as they impact whether to add them into the tbd file and for future verification. * Fix how clang arguments got passed along, previously spacing was passed along to

[clang] [clang][Sema] Warn on return of pointer/reference to compound literal (PR #83741)

2024-03-04 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 closed https://github.com/llvm/llvm-project/pull/83741 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 9dab2e3 - [clang][Sema] Warn on return of pointer/reference to compound literal (#83741)

2024-03-04 Thread via cfe-commits
Author: Youngsuk Kim Date: 2024-03-04T22:10:20-05:00 New Revision: 9dab2e3064a2ad4d5ce65832d605787dc394cb72 URL: https://github.com/llvm/llvm-project/commit/9dab2e3064a2ad4d5ce65832d605787dc394cb72 DIFF: https://github.com/llvm/llvm-project/commit/9dab2e3064a2ad4d5ce65832d605787dc394cb72.diff

[clang] [Fuchsia] Include baremetal ARM builtins and libc (PR #83949)

2024-03-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Petr Hosek (petrhosek) Changes For now we only include the armv6m-unknown-eabi target but we plan to include more targets in the future (including multilibs). --- Full diff: https://github.com/llvm/llvm-project/pull/83949.diff 1 Files

[clang] [Fuchsia] Include baremetal ARM builtins and libc (PR #83949)

2024-03-04 Thread Petr Hosek via cfe-commits
https://github.com/petrhosek created https://github.com/llvm/llvm-project/pull/83949 For now we only include the armv6m-unknown-eabi target but we plan to include more targets in the future (including multilibs). >From 7924ab437a5df81aa5d5481541ad4979335f5a9b Mon Sep 17 00:00:00 2001 From:

[clang] [clang][CUDA] Disable float128 diagnostics for device compilation (PR #83918)

2024-03-04 Thread Pranav Kant via cfe-commits
https://github.com/pranavk edited https://github.com/llvm/llvm-project/pull/83918 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CUDA] Disable float128 diagnostics for device compilation (PR #83918)

2024-03-04 Thread Pranav Kant via cfe-commits
@@ -4877,7 +4877,9 @@ void Sema::AddModeAttr(Decl *D, const AttributeCommonInfo , NewElemTy = Context.getRealTypeForBitwidth(DestWidth, ExplicitType); if (NewElemTy.isNull()) { -Diag(AttrLoc, diag::err_machine_mode) << 1 /*Unsupported*/ << Name; +// Only emit

[clang] [llvm] [RISCV] Add support of Sscofpmf (PR #83831)

2024-03-04 Thread Jessica Clarke via cfe-commits
@@ -807,6 +807,9 @@ def FeatureStdExtSsccptr : SubtargetFeature<"ssccptr", "HasStdExtSsccptr", "true", "'Ssccptr' (Main memory supports page table reads)", []>; +def FeatureStdExtSscofpmf +: SubtargetFeature<"sscofpmf", "HasStdExtSscofpmf",

[clang] [llvm] [RISCV] Add support of Sscofpmf (PR #83831)

2024-03-04 Thread Jessica Clarke via cfe-commits
@@ -234,7 +235,7 @@ Supported .. _riscv-profiles-extensions-note: -``Za128rs``, ``Za64rs``, ``Zic64b``, ``Ziccamoa``, ``Ziccif``, ``Zicclsm``, ``Ziccrse``, ``Shcounterenvw``, ``Shgatpa``, ``Shtvala``, ``Shvsatpa``, ``Shvstvala``, ``Shvstvecd``, ``Ssccptr``,

[clang] [llvm] [RISCV] Add support of Sscofpmf (PR #83831)

2024-03-04 Thread Jessica Clarke via cfe-commits
@@ -234,7 +235,7 @@ Supported .. _riscv-profiles-extensions-note: -``Za128rs``, ``Za64rs``, ``Zic64b``, ``Ziccamoa``, ``Ziccif``, ``Zicclsm``, ``Ziccrse``, ``Shcounterenvw``, ``Shgatpa``, ``Shtvala``, ``Shvsatpa``, ``Shvstvala``, ``Shvstvecd``, ``Ssccptr``,

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

2024-03-04 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: > > It happens later, in LLVM backend, it needs to be fixed. > > From [#65972 > (comment)](https://github.com/llvm/llvm-project/pull/65972#issuecomment-1971855638) > > Is this something you have planned to fix? If not would replacing the .size() > counter with perhaps a

[clang] [llvm] [RISCV] Add support of Sscofpmf (PR #83831)

2024-03-04 Thread Wang Pengcheng via cfe-commits
https://github.com/wangpc-pp closed https://github.com/llvm/llvm-project/pull/83831 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 0fbe45b - [RISCV] Add support of Sscofpmf (#83831)

2024-03-04 Thread via cfe-commits
Author: Wang Pengcheng Date: 2024-03-05T10:45:13+08:00 New Revision: 0fbe45bdb909ee4c1a928cc1da030f8b09860431 URL: https://github.com/llvm/llvm-project/commit/0fbe45bdb909ee4c1a928cc1da030f8b09860431 DIFF:

[clang] [Clang][Sema] Allow access to a public template alias declaration that refers to friend's private nested type (PR #83847)

2024-03-04 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/83847 >From 97b1ff819996ec096e8d0c91db4a67997ab4c0c9 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Mon, 4 Mar 2024 21:51:07 +0800 Subject: [PATCH] [Clang][Sema] Allow access to a public template alias declaration that

[clang] [Clang][Sema] Allow access to a public template alias declaration that refers to friend's private nested type (PR #83847)

2024-03-04 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/83847 >From e3c4715acdc1ead6596b1368590696a04e559414 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Mon, 4 Mar 2024 21:51:07 +0800 Subject: [PATCH] [Clang][Sema] Allow access to a public template alias declaration that

[clang] [Doc][HLSL] Add documentation for root signature. (PR #83933)

2024-03-04 Thread Xiang Li via cfe-commits
@@ -0,0 +1,210 @@ + +HLSL Root Signatures + + +.. contents:: + :local: + +Usage += + +In HLSL, the `root signature +`_ +defines what types of resources are

[clang] [Doc][HLSL] Add documentation for root signature. (PR #83933)

2024-03-04 Thread Xiang Li via cfe-commits
https://github.com/python3kgae updated https://github.com/llvm/llvm-project/pull/83933 >From b134854e7e183a1113ee6ae5c5f7b7910270c987 Mon Sep 17 00:00:00 2001 From: Xiang Li Date: Mon, 4 Mar 2024 16:39:41 -0800 Subject: [PATCH 1/4] [DOC][HLSL] Add documentation for root signature This patch

[clang] [Doc][HLSL] Add documentation for root signature. (PR #83933)

2024-03-04 Thread Xiang Li via cfe-commits
@@ -0,0 +1,210 @@ + +HLSL Root Signatures + + +.. contents:: + :local: + +Usage += + +In HLSL, the `root signature +`_ +defines what types of resources are

[clang] [Doc][HLSL] Add documentation for root signature. (PR #83933)

2024-03-04 Thread Xiang Li via cfe-commits
@@ -0,0 +1,210 @@ + +HLSL Root Signatures + + +.. contents:: + :local: + +Usage += + +In HLSL, the `root signature +`_ +defines what types of resources are

[clang] [Doc][HLSL] Add documentation for root signature. (PR #83933)

2024-03-04 Thread Xiang Li via cfe-commits
https://github.com/python3kgae updated https://github.com/llvm/llvm-project/pull/83933 >From b134854e7e183a1113ee6ae5c5f7b7910270c987 Mon Sep 17 00:00:00 2001 From: Xiang Li Date: Mon, 4 Mar 2024 16:39:41 -0800 Subject: [PATCH 1/3] [DOC][HLSL] Add documentation for root signature This patch

[clang] [llvm] [clang] Use separator for large numeric values in overflow diagnostic (PR #80939)

2024-03-04 Thread Atousa Duprat via cfe-commits
https://github.com/Atousa updated https://github.com/llvm/llvm-project/pull/80939 >From ac75fc2873fc7b8eec6c24ba97f4673e94457c8e Mon Sep 17 00:00:00 2001 From: Atousa Duprat Date: Tue, 6 Feb 2024 21:02:05 -0800 Subject: [PATCH 1/8] [clang] Use separator for large numeric values in overflow

[clang] [Clang][Sema] Allow access to a public template alias declaration that refers to friend's private nested type (PR #83847)

2024-03-04 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/83847 >From 712213e435fffa8bd27d3f0f204bc3d2cdcc40a4 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Mon, 4 Mar 2024 21:51:07 +0800 Subject: [PATCH] [Clang][Sema] Allow access to a public template alias declaration that

[clang] [Doc][HLSL] Add documentation for root signature. (PR #83933)

2024-03-04 Thread Xiang Li via cfe-commits
@@ -0,0 +1,210 @@ + +HLSL Root Signatures + + +.. contents:: + :local: + +Usage += + +In HLSL, the `root signature +`_ +defines what types of resources are

[clang] [Doc][HLSL] Add documentation for root signature. (PR #83933)

2024-03-04 Thread Xiang Li via cfe-commits
@@ -0,0 +1,210 @@ + +HLSL Root Signatures + + +.. contents:: + :local: + +Usage += + +In HLSL, the `root signature +`_ +defines what types of resources are

[clang] [Doc][HLSL] Add documentation for root signature. (PR #83933)

2024-03-04 Thread Xiang Li via cfe-commits
@@ -0,0 +1,210 @@ + +HLSL Root Signatures + + +.. contents:: + :local: + +Usage += + +In HLSL, the `root signature +`_ +defines what types of resources are

[clang] [Doc][HLSL] Add documentation for root signature. (PR #83933)

2024-03-04 Thread Xiang Li via cfe-commits
https://github.com/python3kgae updated https://github.com/llvm/llvm-project/pull/83933 >From b134854e7e183a1113ee6ae5c5f7b7910270c987 Mon Sep 17 00:00:00 2001 From: Xiang Li Date: Mon, 4 Mar 2024 16:39:41 -0800 Subject: [PATCH 1/2] [DOC][HLSL] Add documentation for root signature This patch

[clang] [Clang][Sema] Allow access to a public template alias declaration that refers to friend's private nested type (PR #83847)

2024-03-04 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky edited https://github.com/llvm/llvm-project/pull/83847 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix looking for immediate calls in default arguments. (PR #80690)

2024-03-04 Thread Younan Zhang via cfe-commits
zyn0217 wrote: Does this fix https://github.com/llvm/llvm-project/issues/67134 as well? https://github.com/llvm/llvm-project/pull/80690 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [coroutine] Implement llvm.coro.await.suspend intrinsic (PR #79712)

2024-03-04 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 commented: Thanks. This looks good to me except few nit comments. Have you tested on a real world workloads? https://github.com/llvm/llvm-project/pull/79712 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [llvm] [coroutine] Implement llvm.coro.await.suspend intrinsic (PR #79712)

2024-03-04 Thread Chuanqi Xu via cfe-commits
@@ -167,6 +167,53 @@ class CoroCloner { } // end anonymous namespace +// FIXME: +// Lower the intrinisc in CoroEarly phase if coroutine frame doesn't escape +// and it is known that other transformations, for example, sanitizers +// won't lead to incorrect code. +static void

[clang] [llvm] [coroutine] Implement llvm.coro.await.suspend intrinsic (PR #79712)

2024-03-04 Thread Chuanqi Xu via cfe-commits
@@ -338,6 +414,71 @@ static QualType getCoroutineSuspendExprReturnType(const ASTContext , } #endif +llvm::Function * +CodeGenFunction::generateAwaitSuspendWrapper(Twine const , + Twine const , +

[clang] [llvm] [coroutine] Implement llvm.coro.await.suspend intrinsic (PR #79712)

2024-03-04 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 edited https://github.com/llvm/llvm-project/pull/79712 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] fix false positive in cppcoreguidelines-missing-std-forward (PR #77056)

2024-03-04 Thread Qizhi Hu via cfe-commits
jcsxky wrote: > I agree to fix false positive reported in #68105. But for capturing in lambda > be reference and do forward in lambda, It is just like create a record by ref > instead of using forward and do forward in some member function. I don't > think it is an expected false positive. >

[clang] [Doc][HLSL] Add documentation for root signature. (PR #83933)

2024-03-04 Thread Xiang Li via cfe-commits
@@ -0,0 +1,210 @@ + +HLSL Root Signatures + + +.. contents:: + :local: + +Usage += + +In HLSL, the `root signature +`_ +defines what types of resources are

[clang] [HLSL] Add -HV option translation to clang-dxc.exe (PR #83938)

2024-03-04 Thread Chris B via cfe-commits
@@ -226,6 +226,28 @@ HLSLToolChain::TranslateArgs(const DerivedArgList , StringRef BoundArch, A->claim(); continue; } +if (A->getOption().getID() == options::OPT_dxc_hlsl_version) { + // Translate -HV into -std for llvm + // depending on the

[clang] [HLSL] Add -HV option translation to clang-dxc.exe (PR #83938)

2024-03-04 Thread Chris B via cfe-commits
https://github.com/llvm-beanz edited https://github.com/llvm/llvm-project/pull/83938 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Add -HV option translation to clang-dxc.exe (PR #83938)

2024-03-04 Thread Chris B via cfe-commits
https://github.com/llvm-beanz commented: I worry this pattern will also lend to us having multiple places that parse and translate HLSL versions. Can you look at other places in Clang where we handle these numbers and see if there is a good way to unify the string handling? It would be ideal

[clang] [HLSL] Add -HV option translation to clang-dxc.exe (PR #83938)

2024-03-04 Thread Chris B via cfe-commits
@@ -226,6 +226,28 @@ HLSLToolChain::TranslateArgs(const DerivedArgList , StringRef BoundArch, A->claim(); continue; } +if (A->getOption().getID() == options::OPT_dxc_hlsl_version) { + // Translate -HV into -std for llvm + // depending on the

[clang] [Doc][HLSL] Add documentation for root signature. (PR #83933)

2024-03-04 Thread Chris B via cfe-commits
@@ -0,0 +1,210 @@ + +HLSL Root Signatures + + +.. contents:: + :local: + +Usage += + +In HLSL, the `root signature +`_ +defines what types of resources are

[clang] [Doc][HLSL] Add documentation for root signature. (PR #83933)

2024-03-04 Thread Chris B via cfe-commits
@@ -0,0 +1,210 @@ + +HLSL Root Signatures + + +.. contents:: + :local: + +Usage += + +In HLSL, the `root signature +`_ +defines what types of resources are

  1   2   3   4   5   6   >