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

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

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

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

[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: https://github.com/llvm/llvm-project/commit/0fbe45bdb909ee4c1a928cc1da030f8b09860431.diff

[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] [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 seed

[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``, ``Sscounterenw``

[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``, ``Sscounterenw``

[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", "tru

[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 &CI, NewElemTy = Context.getRealTypeForBitwidth(DestWidth, ExplicitType); if (NewElemTy.isNull()) { -Diag(AttrLoc, diag::err_machine_mode) << 1 /*Unsupported*/ << Name; +// Only emit

[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] [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: Pet

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

[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] [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] [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] [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] [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 `CMAKE_MODULE_LINKE

[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] [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 bo

[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] [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 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] [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
@@ -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}") + set(BUILTINS_${target}_CMAK

[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 *Tra

[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 https://lists.llvm.org/cgi-bin/mailman/li

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

[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 -check-prefix=20

[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<["--", "/", "-"], "HV

[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: ca

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

[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 00:0

[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 --- llvm/incl

[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] [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, cleare

[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, cleare

[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, cleare

[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, cleare

[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] [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 finalizeSy

[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 &M, bool InLTO) { if (Error E = addFuncWithName(F, getPGOFuncName(F, InLTO))) return E; } + + SmallVector Types; + for (GlobalVariable &G : M.globals()) { +if (!G.hasName()) + continue; +Types.

[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 https://lists.llvm.org/cgi-bin/mailman/list

[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
@@ -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 Instru

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

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

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

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

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

[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 &F, bool InLTO, uint64_t Version) { return getPGOFuncName(F.getName(), GlobalValue::ExternalLinkage, ""); } +std::string getPGOName(const GlobalVariable &V, bool InLTO) { + // PGONameMetadata should be set by c

[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 &IterRange); - - /// Update the symtab by adding \p F

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

[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 &IterRange) { return Error::success(); } +template +Error InstrProfSymtab::create(const FuncNameIterRange &FuncIterRange, + const VTableNameIterRange &VTableIterRange) { +

[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 &F, 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
@@ -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 a

[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 &F, StringRef PGOFuncName) { return Error::success(); } +uint64_t InstrProfSymtab::getVTableHashFromAddress(uint64_t Address) { + finalizeSymtab(); snehasish wrote: Like the lookup for G

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

[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 &&t) { return [&]() { return std::forward(t); }; } stru

[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 re-en

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

[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] 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: https://github.com/llvm/llvm-project/commit/9b672de9976084872fbca764898ed722dea1dd9

[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] [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 https://lists.llvm

[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] 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] [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 opt

[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, cleare

[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, cleare

[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 --- .../StaticAnalyzer/C

[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) - (modified

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

<    1   2   3   4   5   6