LLVM/project 9926393llvm/include/llvm/IR GlobalValue.h, llvm/include/llvm/Transforms/Utils AssignGUID.h

Reland #184065
DeltaFile
+61-17llvm/lib/Bitcode/Reader/BitcodeReader.cpp
+45-30llvm/lib/LTO/LTO.cpp
+57-2llvm/lib/IR/Globals.cpp
+49-3llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
+49-0llvm/include/llvm/Transforms/Utils/AssignGUID.h
+42-5llvm/include/llvm/IR/GlobalValue.h
+303-57117 files not shown
+836-402123 files

LLVM/project 774c4c9clang/lib/CodeGen CodeGenModule.cpp, clang/test/CodeGen unique-internal-linkage-names.c unique-internal-linkage-names.cpp

 [clang] -funique-internal-linkage-names should not be applied to asm label (#202004)
DeltaFile
+12-1clang/test/CodeGen/unique-internal-linkage-names.c
+7-0clang/test/CodeGen/unique-internal-linkage-names.cpp
+1-0clang/lib/CodeGen/CodeGenModule.cpp
+20-13 files

LLVM/project 396a31fclang/lib/CodeGen CGCUDANV.cpp, clang/test/CodeGenHIP offload-pgo-sections.hip

Reland HIP offload PGO compiler support and link the device-profile runtime (#201607)

This mostly relands the compiler part of #177665 (approved and merged,
then reverted in #201416). The first commit restores it as merged: the
AMDGPU instrumentation in LLVM and the HIP codegen in Clang.

#177665 was reverted because of a Windows CRT problem, fixed by
splitting the ROCm runtime into a separate library clang_rt.profile_rocm
(see the compiler-rt PR). The second commit links that library on the
host for HIP device PGO, in addOffloadRTLibs for the Linux and MSVC
toolchains, gated on HIP + profiling + the library being present. It is
a superset of clang_rt.profile and is linked first, so the base library
stays inert. Non-HIP links are unaffected.

Depends on the compiler-rt PR that adds clang_rt.profile_rocm.
DeltaFile
+152-0clang/lib/CodeGen/CGCUDANV.cpp
+83-26llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp
+50-0clang/test/CodeGenHIP/offload-pgo-sections.hip
+36-0llvm/test/Instrumentation/InstrProfiling/gpu-weak.ll
+32-0llvm/test/Instrumentation/InstrProfiling/amdgpu-instrumentation.ll
+31-0clang/test/Driver/hip-profile-rocm-runtime.hip
+384-267 files not shown
+460-2913 files

LLVM/project 7ed2f70clang/lib/CodeGen CGHLSLRuntime.cpp, clang/test/CodeGenHLSL/resources cbuffer.hlsl cbuffer-empty-struct-array.hlsl

[HLSL] Set visibility of cbuffer global variables to internal (#200312)

Global variables for all resources except `cbuffer` are already emitted
with internal linkage (since #166844). This change adds internal linkage
to the `cbuffer` handle globals as well.

One problem is that the `cbuffer` handle globals appears unused between
Clang CodeGen and `{DXIL|SPIRV}CBufferAccess` pass, which replaces
individual `cbuffer` constant globals with accesses through the
`cbuffer` handle globals. Before this pass runs, the unused globals
could get optimized away in `GlobalOptPass` with `-O3`.

To solve this, the `cbuffer` handle globals are added to the
`@llvm.compiler.used` list to make sure they stay in the module until
the `{DXIL|SPRIV}CBufferAccess` pass, which then removes them from the
list.
DeltaFile
+38-0llvm/test/CodeGen/DirectX/cbuffer_global_elim.ll
+36-0llvm/test/CodeGen/SPIRV/cbuffer_global_elim.ll
+14-10clang/test/CodeGenHLSL/resources/cbuffer.hlsl
+17-0llvm/lib/Frontend/HLSL/CBuffer.cpp
+10-2clang/lib/CodeGen/CGHLSLRuntime.cpp
+4-4clang/test/CodeGenHLSL/resources/cbuffer-empty-struct-array.hlsl
+119-1611 files not shown
+137-3017 files

LLVM/project 7cc09c4clang-tools-extra/clang-tidy/modernize MacroToEnumCheck.cpp, clang-tools-extra/docs ReleaseNotes.rst

Reland "[clang-tidy] Preserve line endings in macro-to-enum fixes" (#202271)

Use StringRef::detectEOL() when inserting enum braces so fix-its do not
mix LF into CRLF source files.

This reland fixes the previous buildbot failure by adding `--` in test
file.
DeltaFile
+7-2clang-tools-extra/clang-tidy/modernize/MacroToEnumCheck.cpp
+6-0clang-tools-extra/test/clang-tidy/checkers/modernize/macro-to-enum-crlf.cpp
+4-0clang-tools-extra/test/clang-tidy/checkers/modernize/Inputs/macro-to-enum/crlf.cpp.expected
+4-0clang-tools-extra/docs/ReleaseNotes.rst
+2-0clang-tools-extra/test/clang-tidy/checkers/modernize/Inputs/macro-to-enum/crlf.cpp
+2-0clang-tools-extra/test/.gitattributes
+25-26 files

LLVM/project 9ab6d33clang/test/Driver fsanitize-realtime.c, compiler-rt/cmake/Modules AllSupportedArchDefs.cmake

[rtsan][clang] Add Hexagon support for RTSan (#200313)

Enable RTSan for the Hexagon architecture.

* Add Hexagon to ALL_RTSAN_SUPPORTED_ARCH in cmake
* Add a clang driver test for hexagon-unknown-linux-musl
* Guarding a static_assert(sizeof(unsigned long) >= sizeof(off_t)) with
SANITIZER_WORDSIZE >= 64, since off_t syscall args are split into two
regs.
DeltaFile
+3-0compiler-rt/lib/rtsan/rtsan_interceptors_posix.cpp
+3-0clang/test/Driver/fsanitize-realtime.c
+2-0compiler-rt/test/rtsan/lit.cfg.py
+1-1compiler-rt/cmake/Modules/AllSupportedArchDefs.cmake
+9-14 files

LLVM/project d867ddaclang/test/CodeGen/LoongArch/lasx builtin-alias.c builtin.c, llvm/test/CodeGen/AMDGPU amdgcn.bitcast.1024bit.ll memintrinsic-unroll.ll

Merge branch 'emit-cbuffer-globals-as-internal' into users/hekota/pr200312-emit-cbuffer-globals-as-internal
DeltaFile
+5,590-5,510llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.1024bit.ll
+10,469-10llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-load-global.mir
+3,563-3,543llvm/test/CodeGen/AMDGPU/memintrinsic-unroll.ll
+6,598-111llvm/test/CodeGen/X86/clmul-vector.ll
+2,749-2,749clang/test/CodeGen/LoongArch/lasx/builtin-alias.c
+2,745-2,745clang/test/CodeGen/LoongArch/lasx/builtin.c
+31,714-14,6685,567 files not shown
+294,436-157,3795,573 files

LLVM/project 048e967llvm/lib/Target/WebAssembly WebAssemblyRegStackify.cpp

[WebAssembly] Fix unused variable in #200429 (#202464)

Fixes a mistake from #200429.
DeltaFile
+1-2llvm/lib/Target/WebAssembly/WebAssemblyRegStackify.cpp
+1-21 files

LLVM/project e34dc29llvm/unittests/Support/DynamicLibrary DynamicLibraryTest.cpp

[test][Support] Disable CFI-icall for DynamicLibrary Overload test (#202446)

The test performs manual symbol lookup and calls, which triggers
Control Flow Integrity indirect call checks.
DeltaFile
+1-1llvm/unittests/Support/DynamicLibrary/DynamicLibraryTest.cpp
+1-11 files

LLVM/project 564d69aclang/include/clang/AST Expr.h, clang/lib/AST Expr.cpp ExprConstant.cpp

[Clang][counted_by] Honor counted_by in __bdos on direct struct access (#201161)

__builtin_dynamic_object_size on a flexible array member must consult
the 'counted_by' attribute even when the containing struct is accessed
directly (a local or global variable) rather than through a pointer
dereference. The pointer-deref form (p->fam) already worked because the
constant evaluator could not determine the LValue for an opaque
parameter and fell through to the counted_by-aware runtime path in
CGBuiltin. The direct form (af.fam, gaf.fam) was being folded by
tryEvaluateBuiltinObjectSize to a layout-derived size (e.g. trailing
struct padding for locals, trailing initializer data for globals)
silently bypassing emitCountedBySize.

Make the AST constant evaluator refuse to fold __bdos on the same
operands that CGBuiltin's __bdos lowering classifies as a counted_by
FAM access. The check runs after the existing negative-offset early
return so that obviously out-of-bounds operands like &p->array[-42]
still fold to 0, preserving the behavior the sanitizer-bounds test in
attr-counted-by.c (test35) relies on.

    [25 lines not shown]
DeltaFile
+347-0clang/test/CodeGen/attr-counted-by-issue200014.c
+7-59clang/lib/CodeGen/CGBuiltin.cpp
+64-0clang/lib/AST/Expr.cpp
+26-2clang/lib/AST/ExprConstant.cpp
+16-0clang/include/clang/AST/Expr.h
+10-0clang/lib/AST/ByteCode/InterpBuiltin.cpp
+470-616 files

LLVM/project 4aac48dllvm/tools/llvm-exegesis/lib Assembler.h

[𝘀𝗽𝗿] initial version

Created using spr 1.3.7
DeltaFile
+2-1llvm/tools/llvm-exegesis/lib/Assembler.h
+2-11 files

LLVM/project c4b6abdclang/tools/clang-nvlink-wrapper ClangNVLinkWrapper.cpp, clang/unittests/ScalableStaticAnalysisFramework/Serialization/JSONFormatTest TUSummaryTest.cpp

rebase

Created using spr 1.3.7
DeltaFile
+9-1,615clang/unittests/ScalableStaticAnalysisFramework/Serialization/JSONFormatTest/TUSummaryTest.cpp
+1,474-0llvm/test/Transforms/LoopVectorize/VPlan/vplan-printing-reductions-tail-folded.ll
+220-134llvm/test/CodeGen/WebAssembly/multivalue-stackify.ll
+351-0llvm/test/CodeGen/AMDGPU/ldsdmacnt_sched.mir
+0-299llvm/lib/Frontend/Offloading/ArchiveLinker.cpp
+246-35clang/tools/clang-nvlink-wrapper/ClangNVLinkWrapper.cpp
+2,300-2,083124 files not shown
+4,705-2,686130 files

LLVM/project dd87edd.github/workflows/containers/github-action-ci Dockerfile, .github/workflows/containers/github-action-ci-windows Dockerfile

[Github] Bump container runner version (#202471)

To stay ahead of the curve on the support horizon.
DeltaFile
+1-1.github/workflows/containers/github-action-ci/Dockerfile
+1-1.github/workflows/containers/github-action-ci-windows/Dockerfile
+2-22 files

LLVM/project bba08d7libcxx/utils/ci/docker docker-compose.yml

[libcxx] Bump Github runner image version (#202470)

To stay ahead of the curve on the runner support time horizon.
DeltaFile
+1-1libcxx/utils/ci/docker/docker-compose.yml
+1-11 files

LLVM/project 55a17ccllvm/include/llvm/SandboxIR Use.h

[clang-cl] Fix friend class warning on Windows (#201720)

clang-cl warned on "friend class CallInst;" because MSVC may resolve
that to "friend llvm::CallInst" instead of the sbox IR mirrored
hierarchy. Drop the class tag and refer to forward declared names
instead.
DeltaFile
+17-7llvm/include/llvm/SandboxIR/Use.h
+17-71 files

LLVM/project 7af9c33.github/workflows bazel-checks.yml

[Github] Make bazel-checks workflow validate shasums (#202405)

For some added security (although it's probably not super helpful here),
and consistency across the code base.
DeltaFile
+2-0.github/workflows/bazel-checks.yml
+2-01 files

LLVM/project 2426b85clang/test/OffloadTools/clang-sycl-linker link.ll basic.ll, clang/tools/clang-nvlink-wrapper ClangNVLinkWrapper.cpp

Revert "[clang][sycl][nvlink] Share static library linking in Frontend/Offloading (#201253)" (#202457)

This reverts commits
https://github.com/llvm/llvm-project/commit/8aafa50c7a2dfb8ca1d5cdf8980f7f2d259779f5,
https://github.com/llvm/llvm-project/commit/dca9eaa98fd71535e8d283ae390c96266c5b9b8c,
https://github.com/llvm/llvm-project/commit/7389aa2ef380ca2b64d8fa34b633e5d2a4efef0a
and
https://github.com/llvm/llvm-project/commit/6c6338b3438704cddc1cf3bc6676316856b64907.

These commits break libomptarget :: nvptx64-nvidia-cuda. See
https://github.com/llvm/llvm-project/pull/201253#issuecomment-4654267605
for more details.
DeltaFile
+0-299llvm/lib/Frontend/Offloading/ArchiveLinker.cpp
+246-35clang/tools/clang-nvlink-wrapper/ClangNVLinkWrapper.cpp
+110-77clang/tools/clang-sycl-linker/ClangSYCLLinker.cpp
+6-114clang/test/OffloadTools/clang-sycl-linker/link.ll
+0-116llvm/include/llvm/Frontend/Offloading/ArchiveLinker.h
+32-72clang/test/OffloadTools/clang-sycl-linker/basic.ll
+394-7137 files not shown
+406-81313 files

LLVM/project 89086dbllvm/lib/Target/SPIRV SPIRVModuleAnalysis.cpp, llvm/test/CodeGen/SPIRV/extensions/SPV_NV_shader_atomic_fp16_vector atomicrmw_vector_bfloat16_amd.ll

[SPIR-V] Allow bfloat vector atomics lowering without scalarization (#202083)

This is a workaround only for AMD triple - to use
SPV_NV_shader_atomic_fp16_vector for this lowering.
DeltaFile
+55-0llvm/test/CodeGen/SPIRV/extensions/SPV_NV_shader_atomic_fp16_vector/atomicrmw_vector_bfloat16_amd.ll
+4-1llvm/lib/Target/SPIRV/SPIRVModuleAnalysis.cpp
+59-12 files

LLVM/project b472674llvm/lib/Target/WebAssembly WebAssemblyRegStackify.cpp, llvm/test/CodeGen/WebAssembly multivalue-stackify.ll wide-arithmetic.ll

[WebAssembly] Don't stackify multi-def instructions (#200429)

This commit updates the `WebAssemblyRegStackify.cpp` pass to
specifically exclude attempting to stackify the first def of a multi-def
instruction. As the previous comments indicate this is possible to do in
some situations, but the current logic is incomplete and has led to
miscompilations such as #98323 and #199910. One option would be to make
the logic more robust, but in lieu of that in the meantime the change
here is to completely disable stackification in these situations. This
provides at least a "known working" base to build on later and fixes the
known regressions around this.

Closes #98323
Closes #199910
DeltaFile
+220-134llvm/test/CodeGen/WebAssembly/multivalue-stackify.ll
+40-7llvm/test/CodeGen/WebAssembly/wide-arithmetic.ll
+30-8llvm/test/CodeGen/WebAssembly/multivalue.ll
+8-30llvm/lib/Target/WebAssembly/WebAssemblyRegStackify.cpp
+33-0llvm/test/CodeGen/WebAssembly/multivalue-do-not-stackify.ll
+12-0llvm/test/CodeGen/WebAssembly/multivalue_libcall.ll
+343-1796 files

LLVM/project 8cd8eb5llvm/include/llvm/IR GlobalValue.h, llvm/include/llvm/Transforms/Utils AssignGUID.h

Reland #184065
DeltaFile
+61-17llvm/lib/Bitcode/Reader/BitcodeReader.cpp
+45-30llvm/lib/LTO/LTO.cpp
+70-2llvm/lib/IR/Globals.cpp
+49-3llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
+44-5llvm/include/llvm/IR/GlobalValue.h
+49-0llvm/include/llvm/Transforms/Utils/AssignGUID.h
+318-57116 files not shown
+850-398122 files

LLVM/project 7087094clang/test/Analysis/Scalable/ssaf-format/TUSummary summary-data.test linkage.test, clang/test/Analysis/Scalable/ssaf-format/TUSummary/Inputs rt-two-summary-types.json

[clang][ssaf] Convert `JSONFormat` tests for `TUSummary` and `TUSummaryEncoding` to lit tests (#192187)

This change converts most of the `TUSummary` json tests in `TUSummaryTest.cpp` to use `lit`. Some tests require more care and will be addressed in future PRs.
DeltaFile
+9-1,615clang/unittests/ScalableStaticAnalysisFramework/Serialization/JSONFormatTest/TUSummaryTest.cpp
+208-0clang/test/Analysis/Scalable/ssaf-format/TUSummary/Inputs/rt-two-summary-types.json
+202-0clang/test/Analysis/Scalable/ssaf-format/TUSummary/summary-data.test
+104-0clang/test/Analysis/Scalable/ssaf-format/TUSummary/linkage.test
+86-0clang/test/Analysis/Scalable/ssaf-format/TUSummary/id-table.test
+69-0clang/test/Analysis/Scalable/ssaf-format/TUSummary/top-level.test
+678-1,61556 files not shown
+1,683-1,61562 files

LLVM/project 10e9f6bclang/lib/CodeGen CGHLSLRuntime.cpp, clang/test/CodeGenHLSL cbuffer-matrix-layout-keyword.hlsl

Fix test after merge and use @llvm.compiler.used instead of @llvm.used since it does not involve linker
DeltaFile
+4-4clang/lib/CodeGen/CGHLSLRuntime.cpp
+3-3llvm/test/CodeGen/DirectX/cbuffer_global_elim.ll
+3-3llvm/test/CodeGen/SPIRV/cbuffer_global_elim.ll
+4-0clang/test/CodeGenHLSL/resources/cbuffer.hlsl
+2-2clang/test/CodeGenHLSL/cbuffer-matrix-layout-keyword.hlsl
+16-125 files

LLVM/project cae945eclang/unittests/ScalableStaticAnalysisFramework/Analyses/PointerFlow PointerFlowTest.cpp

fix clang format
DeltaFile
+1-1clang/unittests/ScalableStaticAnalysisFramework/Analyses/PointerFlow/PointerFlowTest.cpp
+1-11 files

LLVM/project b01fe4ellvm/lib/Target/AMDGPU AMDGPUBarrierLatency.cpp, llvm/test/CodeGen/AMDGPU ldsdmacnt_sched.mir

[AMDGPU] Do not always add latency between LDSDMA -> S_WAIT_LDSDMA (#201942)

In loop bodies we typically see LDSDMA instructions prefetched an
iteration or more. Thus, we may have LDSDMA, followed by S_WAIT_LDSDMA
that is waiting on prior iteration LDSDMA. Currently, the scheduler
thinks there will be a long stall between this LDSDMA and S_WAIT_LDSDMA.

This adds some basic checking for LDSDMA and S_WAIT_LDSDMA in the same
region to avoid adding latency in cases where we are certain the
S_WAIT_LDSDMA does not correspond with the LDSDMA.
DeltaFile
+351-0llvm/test/CodeGen/AMDGPU/ldsdmacnt_sched.mir
+74-0llvm/lib/Target/AMDGPU/AMDGPUBarrierLatency.cpp
+425-02 files

LLVM/project 6ff6b64clang/unittests/ScalableStaticAnalysisFramework/Analyses/PointerFlow PointerFlowTest.cpp, clang/unittests/ScalableStaticAnalysisFramework/Analyses/UnsafeBufferUsage UnsafeBufferUsageTest.cpp

Use SaveAndRestore
DeltaFile
+2-5clang/unittests/ScalableStaticAnalysisFramework/Analyses/PointerFlow/PointerFlowTest.cpp
+2-3clang/unittests/ScalableStaticAnalysisFramework/Analyses/UnsafeBufferUsage/UnsafeBufferUsageTest.cpp
+4-82 files

LLVM/project 884a434lldb/source/Plugins/Language/CPlusPlus LibCxxMap.cpp LibCxx.cpp, lldb/source/Plugins/Language/ObjC ObjCLanguage.cpp Cocoa.cpp

[lldb][NFC] Remove redundant TypeSystemClang.h includes (#202439)

TypeSystemClang.h includes a lot of other unique headers, and should not
be included unless needed.
DeltaFile
+0-2lldb/source/Plugins/Language/CPlusPlus/LibCxxMap.cpp
+1-1lldb/source/Plugins/Language/ObjC/ObjCLanguage.cpp
+0-1lldb/source/Plugins/Language/CPlusPlus/LibCxx.cpp
+0-1lldb/source/Plugins/Language/CPlusPlus/LibCxxUnorderedMap.cpp
+0-1lldb/source/Plugins/Language/CPlusPlus/LibStdcpp.cpp
+0-1lldb/source/Plugins/Language/ObjC/Cocoa.cpp
+1-75 files not shown
+1-1211 files

LLVM/project c0c6694llvm/lib/Transforms/Vectorize VPlanRecipes.cpp, llvm/test/Transforms/LoopVectorize/VPlan vplan-printing-reductions-tail-folded.ll

[VPlan] Fix vplan printing for VPExpressionRecipe w/conditional reduction. (#198954)

This patch contains two parts.

- Add a new vplan-printing test which is duplicated from
vplan-printing-reductions.ll and force tail folding.
- Fix the printing of VPExpressionRecipe for conditional reductions.
Since the mask operand cannot be accessed directly through the reduction
recipe once folded, it need to be fetched from the expression recipe's
operands.
DeltaFile
+1,474-0llvm/test/Transforms/LoopVectorize/VPlan/vplan-printing-reductions-tail-folded.ll
+7-5llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
+1-1llvm/test/Transforms/LoopVectorize/VPlan/AArch64/vplan-printing.ll
+1,482-63 files

LLVM/project 8796683llvm/unittests/Support/DynamicLibrary PipSqueak.h

[test][DynamicLibrary] Add visibility attribute for GCC/Clang in PipSqueak.h (#202445)

By default CFI builds with hidden, failing expectation for the test.
DeltaFile
+2-0llvm/unittests/Support/DynamicLibrary/PipSqueak.h
+2-01 files

LLVM/project 76afb4dclang/lib/StaticAnalyzer/Core BugReporterVisitors.cpp, clang/test/Analysis placement-new.cpp uninit-const.c

[analyzer] Fix misleading 'initialized here' note for uninitialized d… (#198345)

…eclarations

When a variable is declared without an initializer, the
BugReporterVisitor would emit 'initialized here' as a note, which is
confusing because the variable was never initialized.
Change the note to 'declared without an initial value' for declarations
that have no initializer. Global-storage variables are also taken into
consideration.
Removed the SI.Value.isUndef() case, as it is unreachable in
practice because core.uninitialized.Assign (a core checker, always
enabled) reports
the assignment before this note can surface.
DeltaFile
+7-19clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp
+11-11clang/test/Analysis/placement-new.cpp
+5-5clang/test/Analysis/uninit-const.c
+4-4clang/test/Analysis/std-c-library-functions-arg-constraints.c
+4-4clang/test/Analysis/uninit-vals.m
+2-2clang/test/Analysis/std-c-library-functions-arg-constraints-tracking-notes.c
+33-451 files not shown
+34-467 files

LLVM/project 777df1cclang/unittests/ScalableStaticAnalysisFramework/Analyses/PointerFlow PointerFlowTest.cpp, clang/unittests/ScalableStaticAnalysisFramework/Analyses/UnsafeBufferUsage UnsafeBufferUsageTest.cpp

address comments
DeltaFile
+6-16clang/unittests/ScalableStaticAnalysisFramework/Analyses/PointerFlow/PointerFlowTest.cpp
+6-14clang/unittests/ScalableStaticAnalysisFramework/Analyses/UnsafeBufferUsage/UnsafeBufferUsageTest.cpp
+12-302 files