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

LLVM/project 5709f95lldb/include/lldb/API SBModule.h, lldb/include/lldb/Symbol SymbolFile.h

[LLDB] Expose enumerator for separate-debug-info in SBModule (#144119)

Today we can run `target modules dump separate-debug-info --json` to get
a json blob of all the separate debug info, but it has a few
shortcomings when developing some scripting against it. Namely, the
caller has to know the structure of the JSON per architecture that will
be returned.

I've been working on a Minidump packing utility where we enumerate
symbols and source and put them in a package so we can debug with
symbols portably, and it's been difficult to maintain multiple
architectures due to the above shortcomings. To address this for myself,
I've exposed a simple iterator for the SBModule to get all the
separate-debug-info as list of filespecs with no need for the caller to
have context on what kind of data it is.

I also extened the swig interfaces to make writing my test easier and as
a nice to have.
DeltaFile
+92-0lldb/test/API/python_api/sbmodule/SeperateDebugInfo/TestSBModuleSeparateDebugInfo.py
+39-0lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
+27-0lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
+20-0lldb/include/lldb/API/SBModule.h
+12-0lldb/include/lldb/Symbol/SymbolFile.h
+9-0lldb/source/API/SBModule.cpp
+199-010 files not shown
+236-016 files

LLVM/project 26ebcddclang/lib/CodeGen CGBuiltin.cpp, clang/test/CodeGen prefetch-poison-arg.c

[Clang][CodeGen] Avoid emitting poison immargs for __builtin_prefetch (#201623)

Fixes #201448

This PR fixes invalid clang CodeGen when lowering `__builtin_prefetch`
that is called with a constant expression that produces a poison value.

The code currently assumes that the immediate operands are
`ConstantInt`s. This is not always true as poison values may come from
UB expressions (e.g., `__builtin_prefetch(0, 2 >> 32)`) due to the use
of `EmitScalarExpr`. This would cause the subsequent downcast
`cast<ConstantInt>` in `SelectionDAGBuilder` to fail.

This PR replaces `EmitScalarExpr` with `EmitScalarOrConstFoldImmArg` to
obtain an integer constant instead of emitting a poison value for the
corresponding arguments of `llvm.prefetch`.

A regression test is also added to cover the poison immediate argument
case.

    [4 lines not shown]
DeltaFile
+6-4clang/lib/CodeGen/CGBuiltin.cpp
+6-0clang/test/CodeGen/prefetch-poison-arg.c
+12-42 files

LLVM/project 05830cbllvm/unittests/Support/DynamicLibrary DynamicLibraryTest.cpp

[𝘀𝗽𝗿] initial version

Created using spr 1.3.7
DeltaFile
+1-1llvm/unittests/Support/DynamicLibrary/DynamicLibraryTest.cpp
+1-11 files

LLVM/project 8f115d5libc/src/__support tlsf_index_computation_proof.py

update proof
DeltaFile
+34-23libc/src/__support/tlsf_index_computation_proof.py
+34-231 files

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

[𝘀𝗽𝗿] initial version

Created using spr 1.3.7
DeltaFile
+2-0llvm/unittests/Support/DynamicLibrary/PipSqueak.h
+2-01 files

LLVM/project 52ba9faflang/include/flang/Parser parse-tree.h, flang/lib/Evaluate type.cpp

Reapply "[flang] Enumeration Type: (PR 1/5) Foundation types + Parser" (#202440)

FortranEvaluate referenced DerivedTypeSpec::GetScope(), defined
out-of-line in FortranSemantics, producing an undefined reference in
libFortranEvaluate.so under BUILD_SHARED_LIBS=ON. Made GetScope() inline
in symbol.h so no cross-library symbol is needed.

This is the fix missing from the original PR (#192651), which was
reverted in #202408.

---------

Co-authored-by: Kevin Wyatt <kwyatt at hpe.com>
DeltaFile
+113-0flang/test/Parser/enumeration-type.f90
+34-4flang/include/flang/Parser/parse-tree.h
+29-0flang/lib/Parser/Fortran-parsers.cpp
+23-0flang/lib/Evaluate/type.cpp
+18-4flang/lib/Semantics/type.cpp
+14-0flang/lib/Parser/unparse.cpp
+231-89 files not shown
+287-1115 files

LLVM/project 296e538clang/unittests/ScalableStaticAnalysisFramework/Analyses/PointerFlow PointerFlowTest.cpp

Merge branch 'users/ziqingluo/PR-178747892' of github.com:llvm/llvm-project into users/ziqingluo/PR-178747892
DeltaFile
+1-1clang/unittests/ScalableStaticAnalysisFramework/Analyses/PointerFlow/PointerFlowTest.cpp
+1-11 files

LLVM/project 122e891llvm/lib/CodeGen/SelectionDAG LegalizeVectorTypes.cpp

Update llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp

Co-authored-by: Simon Pilgrim <llvm-dev at redking.me.uk>
DeltaFile
+2-1llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
+2-11 files

LLVM/project 2c041c8llvm/lib/Target/AMDGPU AMDGPUBarrierLatency.cpp

Address nit

Change-Id: I5d592f8948b5c6776639926f0091010869a4ffb7
DeltaFile
+1-1llvm/lib/Target/AMDGPU/AMDGPUBarrierLatency.cpp
+1-11 files

LLVM/project d33b809mlir/lib/Dialect/XeGPU/Transforms XeGPUUnroll.cpp XeGPUBlocking.cpp, mlir/test/Dialect/XeGPU xegpu-blocking.mlir

[MLIR][XeGPU] Add unrolling/blocking support for 3D+ batched operations (#201725)

**Summary**
Add complete transform pass and lowering support for 3D+ batched
operations, building on the operation definition extensions for
load_nd/store_nd/prefetch_nd/dpas/dpas_mx. This enables end-to-end
compilation of batched GEMM workloads (e.g., [4, 64, 32] × [4, 32, 64] →
[4, 64, 64]).

**Key changes:**
Transform passes (XeGPUUnroll.cpp):

> Implement 3D batch unrolling using memref.subview to handle batch
offsets
> UnrollCreateNdOp: For rank > 2 with memref source, create per-batch
memref.subview slices and corresponding create_nd_tdesc ops
> UnrollLoadNdOp/StoreNdOp/PrefetchNdOp: Iterate over batch dimension
then inner 2D tile offsets, reusing batch tdescs across inner tiles
> UnrollDpasOp/UnrollDpasMxOp: Add outer batch loop before M/K/N

    [38 lines not shown]
DeltaFile
+320-121mlir/lib/Dialect/XeGPU/Transforms/XeGPUUnroll.cpp
+109-48mlir/lib/Dialect/XeGPU/Transforms/XeGPUBlocking.cpp
+69-0mlir/test/Dialect/XeGPU/xegpu-blocking.mlir
+63-0mlir/test/Integration/Dialect/XeGPU/WG/simple_3d_mxfp_gemm.mlir
+55-0mlir/test/Integration/Dialect/XeGPU/WG/simple_3d_gemm.mlir
+26-12mlir/lib/Dialect/XeGPU/Transforms/XeGPUPropagateLayout.cpp
+642-1817 files not shown
+724-22513 files

LLVM/project 6e3b3c5clang/lib/ScalableStaticAnalysisFramework/Analyses/PointerFlow PointerFlowExtractor.cpp, clang/lib/ScalableStaticAnalysisFramework/Analyses/UnsafeBufferUsage UnsafeBufferUsageExtractor.cpp

address comments
DeltaFile
+7-9clang/unittests/ScalableStaticAnalysisFramework/Analyses/PointerFlow/PointerFlowTest.cpp
+7-7clang/unittests/ScalableStaticAnalysisFramework/Analyses/UnsafeBufferUsage/UnsafeBufferUsageTest.cpp
+1-0clang/lib/ScalableStaticAnalysisFramework/Analyses/UnsafeBufferUsage/UnsafeBufferUsageExtractor.cpp
+1-0clang/lib/ScalableStaticAnalysisFramework/Analyses/PointerFlow/PointerFlowExtractor.cpp
+16-164 files

LLVM/project 9b128e8clang/include/clang/AST FormatString.h, clang/lib/AST FormatString.cpp PrintfFormatString.cpp

[Clang] add support for C23 'H', 'D', and 'DD' length modifiers (#201098)

This patch adds `-Wformat` support for the C23 `H`, `D`, and `DD` length
modifiers in `printf`/`scanf` format strings. #116962
DeltaFile
+61-4clang/lib/AST/FormatString.cpp
+57-0clang/test/Sema/format-strings-decimal.c
+23-0clang/lib/Sema/SemaChecking.cpp
+20-2clang/lib/AST/PrintfFormatString.cpp
+15-0clang/lib/AST/ScanfFormatString.cpp
+11-0clang/include/clang/AST/FormatString.h
+187-62 files not shown
+193-68 files

LLVM/project 34208ebllvm/unittests/ObjectYAML DXContainerYAMLTest.cpp

[ObjectYAML] Avoid comparison of compressed data (#202413)

The result of zlib compression isn't consistent across versions.
Downstream this test was failing due to our version giving slightly
different results. This version passes both upstream and downstream.

Assisted-by: Automated tooling, human reviewed.
DeltaFile
+44-24llvm/unittests/ObjectYAML/DXContainerYAMLTest.cpp
+44-241 files

LLVM/project f81222cflang/include/flang/Semantics symbol.h, flang/lib/Semantics type.cpp

[flang] Inline DerivedTypeSpec::GetScope to fix shared-lib link

FortranEvaluate referenced DerivedTypeSpec::GetScope(), defined out-of-line
in FortranSemantics, producing an undefined reference in libFortranEvaluate.so
under BUILD_SHARED_LIBS=ON. Make GetScope() inline in symbol.h so no
cross-library symbol is needed.

This is the fix missing from the original PR (#192651), which was reverted
in #202408.
DeltaFile
+6-0flang/include/flang/Semantics/symbol.h
+0-4flang/lib/Semantics/type.cpp
+6-42 files

LLVM/project 8596a89flang/include/flang/Parser parse-tree.h, flang/lib/Evaluate type.cpp

Reapply "[flang] Enumeration Type: (PR 1/5) Foundation types + Parser" (#202408)

This reverts commit 3ab997597e8a5f2920efdad01cf8c29673826ba0.
DeltaFile
+113-0flang/test/Parser/enumeration-type.f90
+34-4flang/include/flang/Parser/parse-tree.h
+29-0flang/lib/Parser/Fortran-parsers.cpp
+23-0flang/lib/Evaluate/type.cpp
+18-0flang/lib/Semantics/type.cpp
+14-0flang/lib/Parser/unparse.cpp
+231-49 files not shown
+281-715 files

LLVM/project 5eae7dcllvm/lib/Transforms/Vectorize VPlanTransforms.cpp VPlan.h, llvm/test/Transforms/LoopVectorize as_cast.ll

Revert "[VPlan] Use VPInstructionWithType for uniform casts." (#202427)

Reverts llvm/llvm-project#140623

breaks https://lab.llvm.org/buildbot/#/builders/160/builds/39088 due to
visibility issues
DeltaFile
+13-16llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+6-14llvm/lib/Transforms/Vectorize/VPlan.h
+5-13llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+9-8llvm/test/Transforms/LoopVectorize/as_cast.ll
+0-17llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h
+6-6llvm/lib/Transforms/Vectorize/VPlanUnroll.cpp
+39-748 files not shown
+53-9814 files

LLVM/project 1d7930allvm/utils/sanitizers ubsan_ignorelist.txt

[ubsan] Add [undefined] section to ignorelist (#202380)

`-fsanitize-blacklist` this files passed as which apply to any
sanitizers.
So if Ubsan is combined with Asan, as-is these suppressions apply to
Asan
which is clearly was not the intention.
DeltaFile
+2-0llvm/utils/sanitizers/ubsan_ignorelist.txt
+2-01 files

LLVM/project 9f73a97llvm/lib/Target/X86 X86SpeculativeLoadHardening.cpp

[X86] Fix typo in SLH statistic description. NFC (#202424)
DeltaFile
+1-1llvm/lib/Target/X86/X86SpeculativeLoadHardening.cpp
+1-11 files

LLVM/project 7bf7d00clang/unittests/ScalableStaticAnalysisFramework/Analyses/PointerFlow PointerFlowTest.cpp

Update clang/unittests/ScalableStaticAnalysisFramework/Analyses/PointerFlow/PointerFlowTest.cpp

Co-authored-by: Balázs Benics <benicsbalazs at gmail.com>
DeltaFile
+1-1clang/unittests/ScalableStaticAnalysisFramework/Analyses/PointerFlow/PointerFlowTest.cpp
+1-11 files

LLVM/project 700febcllvm/lib/Transforms/InstCombine InstCombineSelect.cpp, llvm/test/Transforms/InstCombine select-ctlz-to-cttz.ll

[InstCombine] Fix incorrect is_zero_poison when folding select+ctlz to cttz (#202388)

foldSelectCtlzToCttz folds

    %lz = call i32 @llvm.ctlz.i32(i32 (x & -x), i1 is_zero_poison)
    %r  = select (icmp eq x, 0), i32 32, i32 (xor %lz, 31)

into

    %r = call i32 @llvm.cttz.i32(i32 x, i1 is_zero_poison)

The original select's result is defined when x is zero, even if
is_zero_poison is true.  Therefore in the new cttz call, we need to pass
false for the second param, we can't reuse is_zero_poison.
DeltaFile
+23-0llvm/test/Transforms/InstCombine/select-ctlz-to-cttz.ll
+4-4llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
+27-42 files

LLVM/project 14baa81llvm/lib/Transforms/InstCombine InstCombineCalls.cpp, llvm/test/Transforms/InstCombine frexp.ll

[InstCombine] Fix invalid IR when folding frexp(frexp(x)) with mismatched exponent types (#202419)

Instcombine folds the idempotent frexp pattern

    %inner = call { double, i64 } @llvm.frexp.f64.i64(double %x)
    %f     = extractvalue { double, i64 } %inner, 0
    %outer = call { double, i32 } @llvm.frexp.f64.i32(double %f)

to `{ %f, 0 }`, because the fraction after the first frexp call is known
0.  It did this by reusing the inner frexp's result struct and
overwriting field 1 with zero.

But you can see in this example that reusing the inner frexp's
result struct is invalid, because that call returns { double, i64 },
whereas the second call returns { double, i32 }.

Fix this by building the new struct instead of modifying the old one.
DeltaFile
+11-11llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
+18-0llvm/test/Transforms/InstCombine/frexp.ll
+29-112 files

LLVM/project c06483cllvm/lib/Target/ARM/MCTargetDesc ARMAsmBackend.cpp, llvm/test/MC/ARM bf-invalid-target.s

[ARM] Reject invalid BF encoding when target is next instruction (#201533)

When the BF instruction targets the immediately following label, the
encoded branch offset becomes zero, causing LLVM to emit invalid machine
code.

Add validation in the fixup_bf_branch path to reject this case and emit
an error instead.

Add MC regression test to cover new validation.

Assisted by ChatGPT. Human-verified, debugged, tested and validating by
author.
DeltaFile
+14-0llvm/test/MC/ARM/bf-invalid-target.s
+1-1llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp
+15-12 files

LLVM/project a8cb825flang/include/flang/Lower OpenACC.h, flang/include/flang/Semantics symbol.h

[flang][acc] Fix separate compilation for module !$acc declare create on allocatables. (#202409)

With separate compilation, a module defining `!$acc declare create` on
an allocatable and a using file that allocates it did not get
declare-action lowering in the using Translation Unit(TU):
`ACCDeclareActionConversion` could not resolve the post-alloc recipe
(defined only in the module .o), so no `fir.call` was emitted.

Add `acc.declare_action` for allocatable/pointer symbols under !$acc
declare.
* In the defining TU: Export module-global post-alloc/post-dealloc
recipes as linkable definitions and mark them with acc.declare_action at
creation.
* In the using TU: When declaring a USE-associated module global, emit
private external recipe stubs so the declare-action conversion pass can
insert fir.calls that link to the module definition.
DeltaFile
+43-8flang/lib/Lower/OpenACC.cpp
+37-0flang/test/Lower/OpenACC/acc-declare-use-associated-allocatable.f90
+2-2flang/test/Lower/OpenACC/acc-declare.f90
+3-1flang/include/flang/Semantics/symbol.h
+3-0flang/lib/Lower/ConvertVariable.cpp
+3-0flang/include/flang/Lower/OpenACC.h
+91-111 files not shown
+93-117 files