LLVM/project 07ebb18llvm/test/tools/llvm-profgen coff-profile.test, llvm/test/tools/llvm-profgen/Inputs coff-profile.pdb coff-profile.exe

[llvm-profgen] Support loading symbols from symtab for COFF (#179175)

PE has strict size constraints. The DWARF sections can occupy a
significant amount of spaces. When using pseudo probe, the symtab
already contains all the required info except symbol size. This
patch teachs llvm-profgen to load symbol size from PDB file.
DeltaFile
+43-17llvm/tools/llvm-profgen/ProfiledBinary.cpp
+7-0llvm/test/tools/llvm-profgen/coff-profile.test
+0-0llvm/test/tools/llvm-profgen/Inputs/coff-profile.pdb
+0-0llvm/test/tools/llvm-profgen/Inputs/coff-profile.exe
+50-174 files

LLVM/project b207a86clang/include/clang/CIR/Dialect/IR CIROps.td, clang/lib/CIR/Dialect/IR CIRDialect.cpp

[CIR] Add static_local attribute to GlobalOp and GetGlobalOp

This attribute marks function-local static variables that require
guarded initialization (e.g., C++ static local variables with
non-constant initializers). It is used by CIRGen to communicate
to LoweringPrepare which globals need guard variable emission.
DeltaFile
+19-0clang/test/CIR/IR/static-local.cir
+16-0clang/test/CIR/IR/invalid-static-local.cir
+14-1clang/include/clang/CIR/Dialect/IR/CIROps.td
+4-0clang/lib/CIR/Dialect/IR/CIRDialect.cpp
+53-14 files

LLVM/project ec968declang/include/clang/CIR MissingFeatures.h, clang/lib/CIR/Dialect/Transforms LoweringPrepare.cpp

[CIR][LoweringPrepare] Emit guard variables for static local initialization

This implements the lowering of static local variables with the Itanium C++ ABI
guard variable pattern in LoweringPrepare.

When a GlobalOp has the static_local attribute and a ctor region, this pass:
1. Creates a guard variable global (mangled name from AST)
2. Inserts the guard check pattern at each GetGlobalOp use site:
   - Load guard byte with acquire ordering
   - If zero, call __cxa_guard_acquire
   - If acquire returns non-zero, inline the ctor region code
   - Call __cxa_guard_release
3. Clears the static_local attribute and ctor region from the GlobalOp
DeltaFile
+398-1clang/lib/CIR/Dialect/Transforms/LoweringPrepare.cpp
+33-0clang/test/CIR/CodeGen/static-local.cpp
+1-0clang/include/clang/CIR/MissingFeatures.h
+432-13 files

LLVM/project d1ba875clang/include/clang/CIR/Dialect/IR CIRAttrs.td, clang/lib/CIR/CodeGen CIRGenDecl.cpp CIRGenItaniumCXXABI.cpp

[CIR] Add CIRGen support for static local variables with non-constant initializers

This adds CIRGen infrastructure for C++ function-local static variables
that require guarded initialization (Itanium C++ ABI).

Changes:
- Add ASTVarDeclAttr to carry VarDecl AST through the pipeline
- Add emitGuardedInit() to CIRGenCXXABI for guarded initialization
- Add emitCXXGuardedInit() to CIRGenFunction
- Replace NYI in addInitializerToStaticVarDecl() with ctor region emission
- Set static_local attribute on GlobalOp and GetGlobalOp

The global's ctor region contains the initialization code, which will be
lowered by LoweringPrepare to emit the actual guard variable pattern with
__cxa_guard_acquire/__cxa_guard_release calls.
DeltaFile
+49-0clang/include/clang/CIR/Dialect/IR/CIRAttrs.td
+30-0clang/test/CIR/CodeGen/static-local.cpp
+13-3clang/lib/CIR/CodeGen/CIRGenDecl.cpp
+15-0clang/lib/CIR/CodeGen/CIRGenItaniumCXXABI.cpp
+14-0clang/lib/CIR/CodeGen/CIRGenDeclCXX.cpp
+7-0clang/lib/CIR/CodeGen/CIRGenCXXABI.h
+128-36 files not shown
+140-712 files

LLVM/project c498fcfclang/include/clang/CIR/Interfaces ASTAttrInterfaces.td ASTAttrInterfaces.h, clang/lib/CIR/Interfaces ASTAttrInterfaces.cpp CMakeLists.txt

[CIR] Add ASTVarDeclInterface for AST attribute access

Add the ASTVarDeclInterface which provides methods to access clang AST
VarDecl information from CIR attributes. This interface enables:
- mangleStaticGuardVariable: Mangle guard variable names using clang's
  MangleContext
- isLocalVarDecl: Check if a variable is function-local
- getTLSKind: Get thread-local storage kind
- isInline: Check if the variable is inline
- getTemplateSpecializationKind: Get template specialization info
- getVarDecl: Direct access to the underlying VarDecl pointer

This infrastructure is needed for proper handling of static local
variables with guard variables in LoweringPrepare.
DeltaFile
+51-0clang/include/clang/CIR/Interfaces/ASTAttrInterfaces.td
+22-0clang/include/clang/CIR/Interfaces/ASTAttrInterfaces.h
+21-0clang/lib/CIR/Interfaces/ASTAttrInterfaces.cpp
+9-0clang/include/clang/CIR/Interfaces/CMakeLists.txt
+2-0clang/lib/CIR/Interfaces/CMakeLists.txt
+105-05 files

LLVM/project d0f9373mlir/lib/Dialect/GPU/Pipelines GPUToXeVMPipeline.cpp

[mlir][gpu][pipeline] Add missing passes in XeGPU to XeVM pipeline (#179320)

DeltaFile
+17-7mlir/lib/Dialect/GPU/Pipelines/GPUToXeVMPipeline.cpp
+17-71 files

LLVM/project 17eac11llvm/test/Instrumentation/MemorySanitizer/AArch64 aarch64-bf16-dotprod-intrinsics.ll

[msan][NFCI] Remove redundant tests from aarch64-bf16-dotprod-intrinsics.ll (#178832)

https://github.com/llvm/llvm-project/pull/178510#discussion_r2739401507
requested simplifying test cases by using parameters directly for the
intrinsic calls. Doing that reduces the test case to duplicates of
existing tests, thus this patch deletes the redundant tests.
DeltaFile
+3-299llvm/test/Instrumentation/MemorySanitizer/AArch64/aarch64-bf16-dotprod-intrinsics.ll
+3-2991 files

LLVM/project bb7d1efllvm/lib/Transforms/Instrumentation MemorySanitizer.cpp

[msan] Add intermediate verbosity instruction dump (#178771)

This patch does not change MSan's instrumentation.

-msan-dump-{heuristic,strict}-instructions currently prints out two
lines per instruction:
1) instruction name only e.g., `call llvm.aarch64.neon.uqsub.v16i8`
2) the full instruction, including actual variables e.g., `%vqsubq_v.i15
= call noundef <16 x i8> @llvm.aarch64.neon.uqsub.v16i8(<16 x i8>
%vext21.i, <16 x i8> splat (i8 1)), !dbg !66`

Option 1) is too sparse for some uses, because it does not contain the
return types or parameter types (although `.v16i8` is part of the
function name in this example, in general, the function name does not
describe the types completely; e.g., `<16 x float>
llvm.x86.avx512.mask.scalef.ps.512(<16 x float>, <16 x float>, <16 x
float>, i16, i32)`). OTOH option 2) can be too verbose because it
contains the actual variables.


    [4 lines not shown]
DeltaFile
+40-0llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
+40-01 files

LLVM/project 0ec69a9clang/include/clang/CIR MissingFeatures.h, clang/lib/CIR/Dialect/IR CIRDialect.cpp

[CIR][NFC] Cleanup some stale missing features markers (#179822)

This deletes a few missing features markers where the missing code had
actually been implemented and deletes a handful that were not being used
anywhere.
DeltaFile
+0-6clang/include/clang/CIR/MissingFeatures.h
+0-3clang/lib/CIR/Dialect/Transforms/FlattenCFG.cpp
+0-1clang/lib/CIR/Dialect/IR/CIRDialect.cpp
+0-103 files

LLVM/project a3e7183llvm/lib/Transforms/InstCombine InstCombineSelect.cpp, llvm/utils profcheck-xfail.txt

InstCombine: Propagate profile metadata in symmetric select folding
DeltaFile
+6-3llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
+0-1llvm/utils/profcheck-xfail.txt
+6-42 files

LLVM/project da0d536llvm/lib/Transforms/InstCombine InstCombineAddSub.cpp, llvm/test/Transforms/InstCombine zext-bool-add-sub.ll

[InstCombine][profcheck] Fix missing profdata for zext/sext transform and update tests
DeltaFile
+0-49llvm/utils/profcheck-xfail.txt
+8-12llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp
+1-1llvm/test/Transforms/InstCombine/zext-bool-add-sub.ll
+9-623 files

LLVM/project 22b2f0allvm/lib/Transforms/InstCombine InstCombineAddSub.cpp, llvm/test/Transforms/InstCombine zext-bool-add-sub.ll

[InstCombine][profcheck] Fix missing profdata for zext transform.
DeltaFile
+17-4llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp
+9-5llvm/test/Transforms/InstCombine/zext-bool-add-sub.ll
+0-1llvm/utils/profcheck-xfail.txt
+26-103 files

LLVM/project 13a6ae0llvm/lib/Transforms/InstCombine InstCombineSelect.cpp InstCombineAndOrXor.cpp, llvm/utils profcheck-xfail.txt

InstCombine: Propagate profile metadata in logical op creation and select folding
DeltaFile
+12-0llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
+8-2llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
+0-1llvm/utils/profcheck-xfail.txt
+20-33 files

LLVM/project ea56f5allvm/lib/Transforms/InstCombine InstCombineShifts.cpp, llvm/utils profcheck-xfail.txt

InstCombine: Set unknown profile metadata in lshr-to-select folding
DeltaFile
+8-1llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp
+0-1llvm/utils/profcheck-xfail.txt
+8-22 files

LLVM/project 6c7f356llvm/lib/Transforms/InstCombine InstCombineCalls.cpp InstCombineSelect.cpp, llvm/utils profcheck-xfail.txt

InstCombine: Propagate profile metadata in clamp folds and fix verifier errors
DeltaFile
+18-5llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
+5-4llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
+0-1llvm/utils/profcheck-xfail.txt
+23-103 files

LLVM/project 3ea8a1allvm/lib/Transforms/InstCombine InstCombineSelect.cpp, llvm/utils profcheck-xfail.txt

InstCombine: Propagate profile metadata in nested select folding
DeltaFile
+6-2llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
+1-1llvm/utils/profcheck-xfail.txt
+7-32 files

LLVM/project 8802dd0llvm/lib/Transforms/Utils SimplifyLibCalls.cpp, llvm/utils profcheck-xfail.txt

InstCombine: Comprehensive fix for missing profile metadata in libcall simplifications
DeltaFile
+50-22llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
+0-1llvm/utils/profcheck-xfail.txt
+50-232 files

LLVM/project 0243197llvm/lib/Transforms/InstCombine InstCombineSelect.cpp, llvm/utils profcheck-xfail.txt

InstCombine: Propagate profile metadata in select factorization folding
DeltaFile
+12-12llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
+0-1llvm/utils/profcheck-xfail.txt
+12-132 files

LLVM/project 43d2b69llvm/lib/Transforms/InstCombine InstCombineShifts.cpp InstCombineAddSub.cpp, llvm/utils profcheck-xfail.txt

InstCombine: Propagate profile metadata in shift-of-select folding
DeltaFile
+8-2llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp
+3-0llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp
+2-1llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
+0-1llvm/utils/profcheck-xfail.txt
+13-44 files

LLVM/project 950190dllvm/lib/Transforms/Utils SimplifyLibCalls.cpp, llvm/utils profcheck-xfail.txt

InstCombine: Set unknown profile metadata in memchr-to-select folding
DeltaFile
+10-1llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
+0-1llvm/utils/profcheck-xfail.txt
+10-22 files

LLVM/project bed32f8llvm/lib/Transforms/InstCombine InstCombineSelect.cpp InstCombineCalls.cpp, llvm/utils profcheck-xfail.txt

InstCombine: Propagate profile metadata in select(ldexp) and ldexp(select) folding
DeltaFile
+11-2llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
+5-0llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
+0-1llvm/utils/profcheck-xfail.txt
+16-33 files

LLVM/project 811479dllvm/lib/Transforms/InstCombine InstCombineAndOrXor.cpp, llvm/utils profcheck-xfail.txt

InstCombine: Set unknown profile metadata in logic-to-select folding
DeltaFile
+3-0llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
+0-1llvm/utils/profcheck-xfail.txt
+3-12 files

LLVM/project cd70377llvm/lib/Transforms/InstCombine InstCombineCalls.cpp, llvm/utils profcheck-xfail.txt

InstCombine: Propagate profile metadata in ldexp(zext) folding
DeltaFile
+10-0llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
+0-1llvm/utils/profcheck-xfail.txt
+10-12 files

LLVM/project 7397449llvm/lib/Transforms/InstCombine InstCombineAddSub.cpp, llvm/test/Transforms/InstCombine fneg.ll

InstCombine: Propagate profile metadata in fneg(select) folding
DeltaFile
+8-4llvm/test/Transforms/InstCombine/fneg.ll
+6-0llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp
+0-1llvm/utils/profcheck-xfail.txt
+14-53 files

LLVM/project 45509d3llvm/lib/Transforms/InstCombine InstCombineCalls.cpp, llvm/test/Transforms/InstCombine fabs.ll

InstCombine: Propagate profile metadata in fabs(select) folding
DeltaFile
+5-3llvm/test/Transforms/InstCombine/fabs.ll
+3-0llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
+0-1llvm/utils/profcheck-xfail.txt
+8-43 files

LLVM/project b2cdda5llvm/lib/Transforms/InstCombine InstCombineMulDivRem.cpp, llvm/test/Transforms/InstCombine fmul.ll

InstCombine: Propagate profile metadata in mul(select) folding
DeltaFile
+50-8llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
+5-3llvm/test/Transforms/InstCombine/fmul.ll
+0-1llvm/utils/profcheck-xfail.txt
+55-123 files

LLVM/project 7596736llvm/lib/Transforms/Utils SimplifyLibCalls.cpp, llvm/utils profcheck-xfail.txt

InstCombine: Propagate profile metadata in SimplifyLibCalls for FFS
DeltaFile
+15-1llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
+0-1llvm/utils/profcheck-xfail.txt
+15-22 files

LLVM/project 5d270dellvm/lib/Analysis MemoryBuiltins.cpp, llvm/test/Transforms/InstCombine builtin-dynamic-object-size.ll

InstCombine: Propagate profile metadata in objectsize lowering to select
DeltaFile
+16-0llvm/lib/Analysis/MemoryBuiltins.cpp
+8-3llvm/test/Transforms/InstCombine/builtin-dynamic-object-size.ll
+0-1llvm/utils/profcheck-xfail.txt
+24-43 files

LLVM/project 886e528llvm/lib/Transforms/InstCombine InstCombineSelect.cpp InstCombineInternal.h, llvm/test/Transforms/InstCombine canonicalize-clamp-like-pattern-between-negative-and-positive-thresholds.ll

InstCombine: Propagate profile metadata in clamp canonicalization
DeltaFile
+16-6llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
+8-4llvm/test/Transforms/InstCombine/canonicalize-clamp-like-pattern-between-negative-and-positive-thresholds.ll
+1-1llvm/lib/Transforms/InstCombine/InstCombineInternal.h
+0-1llvm/utils/profcheck-xfail.txt
+25-124 files

LLVM/project 56abc5bllvm/lib/Transforms/InstCombine InstCombineCalls.cpp, llvm/test/Transforms/InstCombine bitreverse.ll

InstCombine: Propagate profile metadata in bitreverse to select
DeltaFile
+8-3llvm/test/Transforms/InstCombine/bitreverse.ll
+7-2llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
+0-1llvm/utils/profcheck-xfail.txt
+15-63 files