LLVM/project 941a04ellvm/lib/Target/AMDGPU GCNHazardRecognizer.h AMDGPU.td, llvm/test/CodeGen/AMDGPU fence-barrier-latency.ll llvm.amdgcn.tensor.load.store.ll

[AMDGPU] Keep TDM counter low (#214885)

Fixes: LCOMPILER-2572
DeltaFile
+153-0llvm/test/CodeGen/AMDGPU/hazards-gfx1250.mir
+27-0llvm/lib/Target/AMDGPU/GCNHazardRecognizer.cpp
+8-0llvm/lib/Target/AMDGPU/AMDGPU.td
+3-0llvm/test/CodeGen/AMDGPU/llvm.amdgcn.tensor.load.store.ll
+1-0llvm/test/CodeGen/AMDGPU/fence-barrier-latency.ll
+1-0llvm/lib/Target/AMDGPU/GCNHazardRecognizer.h
+193-06 files

LLVM/project 8f69580llvm/lib/MC MCXCOFFStreamer.cpp, llvm/test/MC/PowerPC aix-weak-definition.s

[PowerPC][AIX] Reject .weak_definition like ELF (#156072)

weak_definition is a Mach-O-specific directive and is not supported on
XCOFF. Previously it crashed the XCOFF streamer via report_fatal_error
in emitSymbolAttribute. Return false for MCSA_WeakDefinition like
MCELFStreamer does, so the parser rejects it with the same diagnostic as
ELF.
DeltaFile
+13-0llvm/test/MC/PowerPC/aix-weak-definition.s
+4-0llvm/lib/MC/MCXCOFFStreamer.cpp
+17-02 files

LLVM/project efe96c5libc/config/linux/aarch64 entrypoints.txt, libc/config/linux/riscv entrypoints.txt

Revert "[libc] Add realpath to linux entrypoints" (#215156)

Reverts llvm/llvm-project#212925, the tests assume that `/tmp` is a
real, valid directory on the system, which is not true for all
buildbots. `libc-riscv32-qemu-yocto-fullbuild-dbg` in particular seems
to have a symlink or similar from `/tmp` to `/var/volatile/tmp`. See
https://github.com/llvm/llvm-project/pull/212925#issuecomment-5234167255.
DeltaFile
+4-1libc/config/linux/x86_64/entrypoints.txt
+4-1libc/config/linux/riscv/entrypoints.txt
+0-1libc/config/linux/aarch64/entrypoints.txt
+8-33 files

LLVM/project 7941265clang/lib/StaticAnalyzer/Checkers DanglingPtrDeref.cpp

[analyzer] Add aggregate lifetime source binding to DanglingPtrDeref
DeltaFile
+8-0clang/lib/StaticAnalyzer/Checkers/DanglingPtrDeref.cpp
+8-01 files

LLVM/project fbda2f3clang/lib/StaticAnalyzer/Checkers LifetimeModeling.cpp, clang/test/Analysis lifetime-bound.cpp

Handle by-value struct cases and remove test case comment.
DeltaFile
+9-15clang/test/Analysis/lifetime-bound.cpp
+9-3clang/lib/StaticAnalyzer/Checkers/LifetimeModeling.cpp
+18-182 files

LLVM/project 8fd9018llvm/test/CodeGen/DirectX WaveGetLaneCount.ll

[DXIL,test] Fix WaveGetLaneCount.ll after #156338 (#215155)
DeltaFile
+3-3llvm/test/CodeGen/DirectX/WaveGetLaneCount.ll
+3-31 files

LLVM/project bc0b122llvm/lib/Target/AMDGPU GCNHazardRecognizer.h AMDGPU.td, llvm/test/CodeGen/AMDGPU fence-barrier-latency.ll llvm.amdgcn.tensor.load.store.ll

[AMDGPU] Keep TDM counter low

Fixes: LCOMPILER-2572
DeltaFile
+153-0llvm/test/CodeGen/AMDGPU/hazards-gfx1250.mir
+27-0llvm/lib/Target/AMDGPU/GCNHazardRecognizer.cpp
+8-0llvm/lib/Target/AMDGPU/AMDGPU.td
+3-0llvm/test/CodeGen/AMDGPU/llvm.amdgcn.tensor.load.store.ll
+1-0llvm/test/CodeGen/AMDGPU/fence-barrier-latency.ll
+1-0llvm/lib/Target/AMDGPU/GCNHazardRecognizer.h
+193-06 files

LLVM/project 3c13d11utils/bazel/llvm-project-overlay/libc BUILD.bazel, utils/bazel/llvm-project-overlay/libc/test/src/stdlib BUILD.bazel

[bazel][libc] Add targets for realpath (#215127)
DeltaFile
+142-12utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+27-0utils/bazel/llvm-project-overlay/libc/test/src/stdlib/BUILD.bazel
+169-122 files

LLVM/project cc563cblibc/config/linux/aarch64 entrypoints.txt, libc/config/linux/riscv entrypoints.txt

[libc] Add realpath to linux entrypoints (#212925)
DeltaFile
+1-4libc/config/linux/x86_64/entrypoints.txt
+1-4libc/config/linux/riscv/entrypoints.txt
+1-0libc/config/linux/aarch64/entrypoints.txt
+3-83 files

LLVM/project fc008d0llvm/test/Transforms/SLPVectorizer insert-element-build-vector.ll insert-element-build-vector-inseltpoison.ll, llvm/test/Transforms/SLPVectorizer/X86 entries-shuffled-diff-sizes.ll pr47629.ll

Rebase, fix regressions

Created using spr 1.3.7
DeltaFile
+94-2llvm/test/Transforms/SLPVectorizer/insert-element-build-vector.ll
+94-2llvm/test/Transforms/SLPVectorizer/insert-element-build-vector-inseltpoison.ll
+30-23llvm/test/Transforms/SLPVectorizer/X86/select-copyable-cmp-poison.ll
+36-16llvm/test/Transforms/SLPVectorizer/X86/pr47629.ll
+36-16llvm/test/Transforms/SLPVectorizer/X86/pr47629-inseltpoison.ll
+14-8llvm/test/Transforms/SLPVectorizer/X86/entries-shuffled-diff-sizes.ll
+304-672 files not shown
+320-698 files

LLVM/project 3f4f519llvm/test/Transforms/ConstraintElimination monotonic-int-phis-decrement.ll induction-condition-in-loop-exit-postinc.ll

[ConstraintElim] Add tests for facts with decrementing IVs. (NFC) (#215143)

Extend test coverage with loops with decrementing inductions.
DeltaFile
+383-2llvm/test/Transforms/ConstraintElimination/induction-condition-in-loop-exit-postinc.ll
+163-0llvm/test/Transforms/ConstraintElimination/monotonic-int-phis-decrement.ll
+546-22 files

LLVM/project c1119e9llvm/test/MC/Disassembler/AMDGPU decode-err.txt

[NFC][AMDGPU] Use brackets in decode-err.txt
DeltaFile
+65-61llvm/test/MC/Disassembler/AMDGPU/decode-err.txt
+65-611 files

LLVM/project 5c8f5b6llvm/lib/Transforms/Vectorize VPlanTransforms.cpp, llvm/test/Transforms/LoopVectorize outer_loop_contiguous.ll

[VPlan] Don't classify irregular element types as contiguous. (#215121)

Before classifying an access as continuous, check if it has an irregular
type. If so, do not widen incorrectly. This matches the logic of the
inner loop code path.
DeltaFile
+5-13llvm/test/Transforms/LoopVectorize/outer_loop_contiguous.ll
+12-6llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+17-192 files

LLVM/project f531029llvm/lib/Target/AMDGPU/Disassembler AMDGPUDisassembler.h AMDGPUDisassembler.cpp, llvm/test/MC/Disassembler/AMDGPU decode-err.txt

[AMDGPU][MC] Fix out-of-range MFMA tuple register-name assertion

Fixes #215007.
DeltaFile
+51-34llvm/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.cpp
+16-0llvm/test/MC/Disassembler/AMDGPU/decode-err.txt
+2-2llvm/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.h
+69-363 files

LLVM/project 00e6263llvm/include/llvm/Analysis BlockFrequencyInfoImpl.h

[BFI] Extract computeMassInIrreducibleLoop. NFC (#215137)

This is a load-bearing irreducible loop extension of the Wu-larus
algorithm.
Give it its own function.
DeltaFile
+71-58llvm/include/llvm/Analysis/BlockFrequencyInfoImpl.h
+71-581 files

LLVM/project 79341d1clang/lib/Sema SemaExprCXX.cpp

[Clang] Fix -Wunused-variable in #211482 (#215134)

This is only used in asserts, so fails in a release build without
asserts with -Werror -Wunused-variable with the latest clang.
DeltaFile
+1-1clang/lib/Sema/SemaExprCXX.cpp
+1-11 files

LLVM/project 44c91f6bolt/include/bolt/Passes LongJmp.h, bolt/lib/Passes LongJmp.cpp

[BOLT] Relax conditional tail calls in non-simple functions (#214400)

In compact code model relaxLocalBranches() skipped non-simple functions
that may have conditional tail calls targeting symbols in other far away
functions, which could fail during JITLink because the targets are out
of range.

Fix this by having relaxLocalBranches() process non-simple functions,
for which trampolines are added at the end of function body using
unconditional branches (128MB range) to reach far away targets.
DeltaFile
+107-42bolt/lib/Passes/LongJmp.cpp
+87-0bolt/test/AArch64/compact-code-model-nonsimple.s
+3-2bolt/include/bolt/Passes/LongJmp.h
+197-443 files

LLVM/project 61856dbllvm/lib/Transforms/Scalar LoopPassManager.cpp, llvm/test/Other new-pm-thinlto-prelink-samplepgo-defaults.ll dump-before-after.ll

[LoopPassManager] Exit early for loop-free fns in FunctionToLoopPass. (#215011)

FunctionToLoopPassAdopter::run is a no-op for loop-free functions, but
still requires retrieving all required analyses for the loop pass
manager.

Avoiding this for loop-free functions can reduce compile-time, with the
amount of saving depending on the type of workload:

CTMark reduces by -0.04% to -0.06% depending on exact config,
Clang-stage2 -0.13%


https://llvm-compile-time-tracker.com/compare.php?from=2f9775ad49bf8eb0d4a54592d40652df3e4f38dd&to=a37331c186f90da56a4c945f96813c816bedbbc6&stat=instructions:u

PR: https://github.com/llvm/llvm-project/pull/215011
DeltaFile
+22-33llvm/test/Other/loop-pm-invalidation.ll
+19-1llvm/test/Other/print-at-pass-number.ll
+6-5llvm/lib/Transforms/Scalar/LoopPassManager.cpp
+4-4llvm/test/Other/dump-before-after.ll
+2-2llvm/test/Transforms/LoopRotate/pr35210.ll
+1-1llvm/test/Other/new-pm-thinlto-prelink-samplepgo-defaults.ll
+54-466 files not shown
+60-5212 files

LLVM/project 113befcllvm/lib/Target/AMDGPU SIInstrInfo.td, llvm/lib/Target/AMDGPU/Disassembler AMDGPUDisassembler.cpp

[AMDGPU][MC] Fix a crash when invalid SDWA encoding is used

Fixes #215006.
DeltaFile
+23-0llvm/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.cpp
+14-0llvm/test/MC/Disassembler/AMDGPU/decode-err.txt
+4-1llvm/lib/Target/AMDGPU/SIInstrInfo.td
+41-13 files

LLVM/project 003903dllvm/lib/Transforms/InstCombine InstCombineSelect.cpp, llvm/test/Transforms/InstCombine select-and-or-powerof2.ll

[InstCombine] Fold select (A & Shift == 0 | B & Shift == 0), 0, Shift to Shift & A & B (#212132)

Implements the following folds:
1. `select ((A & Shift) == 0 || (B & Shift) == 0), 0, Shift`
$\rightarrow$ `Shift & A & B`
2. `select ((A & Shift) != 0 && (B & Shift) != 0), Shift, 0`
$\rightarrow$ `Shift & A & B`

Alive2:
[https://alive2.llvm.org/ce/z/KC0iRm](https://alive2.llvm.org/ce/z/KC0iRm)

Close #138650
DeltaFile
+158-0llvm/test/Transforms/InstCombine/select-and-or-powerof2.ll
+45-0llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
+203-02 files

LLVM/project 42b765cclang/lib/StaticAnalyzer/Checkers DanglingPtrDeref.cpp

[analyzer] Add aggregate lifetime source binding to DanglingPtrDeref
DeltaFile
+8-0clang/lib/StaticAnalyzer/Checkers/DanglingPtrDeref.cpp
+8-01 files

LLVM/project 39785aaclang/lib/StaticAnalyzer/Checkers LifetimeModeling.cpp

Use auto for AggrRegs in checkPostCall.
DeltaFile
+1-2clang/lib/StaticAnalyzer/Checkers/LifetimeModeling.cpp
+1-21 files

LLVM/project 12c8828llvm/lib/Target/AMDGPU/Disassembler AMDGPUDisassembler.cpp, llvm/test/MC/Disassembler/AMDGPU gfx9_dasm_mai_err.txt

[AMDGPU][MC] Return fail when it is not a VGPR in the decoder

Fixes #215003.
DeltaFile
+26-0llvm/test/MC/Disassembler/AMDGPU/gfx9_dasm_mai_err.txt
+8-0llvm/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.cpp
+34-02 files

LLVM/project 251ccdcclang/lib/StaticAnalyzer/Checkers DanglingPtrDeref.cpp

[analyzer] Add aggregate lifetime source binding to DanglingPtrDeref
DeltaFile
+8-0clang/lib/StaticAnalyzer/Checkers/DanglingPtrDeref.cpp
+8-01 files

LLVM/project 57cb609clang/lib/StaticAnalyzer/Checkers LifetimeModeling.cpp

Refactor hasAnyParamLifetimeAnnotated.
DeltaFile
+3-5clang/lib/StaticAnalyzer/Checkers/LifetimeModeling.cpp
+3-51 files

LLVM/project bd2281eutils/bazel/llvm-project-overlay/libc BUILD.bazel, utils/bazel/llvm-project-overlay/libc/test/src/stdlib BUILD.bazel

[bazel][libc] Add targets for realpath
DeltaFile
+142-12utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+27-0utils/bazel/llvm-project-overlay/libc/test/src/stdlib/BUILD.bazel
+169-122 files

LLVM/project 51de808llvm/include/llvm/Analysis BlockFrequencyInfoImpl.h, llvm/lib/Analysis BlockFrequencyInfoImpl.cpp

[BFI] Detect irreducible SCC from CycleInfo instead of by failing. NFC (#214941)

BFI computes block frequencies with the Wu-Larus algorithm, extended (in
2014) to irreducible SCCs by modelling each one as a loop with multiple
headers.

Irreducible SCCs are detected by failing: mass distribution runs until
`addToDist` hits a retreating local edge to a non-header, then aborts,
packages the SCCs it found, and reruns.

CycleInfo already reports reducibility, so mark the innermost enclosing
loop (or the top level) while initializeLoops walks the cycle forest,
and package the marked regions before distributing any mass.  The abort
paths and both undo sites become asserts.

Aided by Claude Opus 5
DeltaFile
+67-96llvm/include/llvm/Analysis/BlockFrequencyInfoImpl.h
+9-37llvm/lib/Analysis/BlockFrequencyInfoImpl.cpp
+76-1332 files

LLVM/project 1adc2cautils/bazel/llvm-project-overlay/libc BUILD.bazel, utils/bazel/llvm-project-overlay/libc/test/src/stdlib BUILD.bazel

[bazel][libc] Add targets for realpath
DeltaFile
+142-12utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+28-0utils/bazel/llvm-project-overlay/libc/test/src/stdlib/BUILD.bazel
+170-122 files

LLVM/project 08cb7d9llvm/include/llvm/Support GenericDomTreeConstruction.h

[DomTree] Store immediate dominator as DFS number. NFC (#215059)

Replace the local variable `IDoms` and the pointer `InfoRec::IDom` with
a DFS number member.

Since `attachNewSubtree` and `reattachExistingSubtree` walk NumToNode in
DFS order, they can index IDom directly. Replace an always-false `if
(DT.getNode(W))` condition with an assert.
DeltaFile
+20-31llvm/include/llvm/Support/GenericDomTreeConstruction.h
+20-311 files

LLVM/project 3d88682compiler-rt/test/sanitizer_common/TestCases sanitizer_coverage_stack_depth.cpp sanitizer_coverage_inline_bool_flag.cpp

[sanitizer-common][rtsan] Mark unsupported tests (#213404)

From #213170, turning that PR into separate commits as suggested.

To enable rtsan in sanitizer common, first disable the tests that are
not trivially fixable (or will remain permanently unsupported).


Quoting from that other review, assuming all of these are merged and
rtsan is enabled for sanitizer-common
---
Darwin:
New tests that run and pass: 249
UNSUPPORTED: 26
Total: 275
UNSUPPORTED percentage: 9.5%

Linux is about the same, few additional unsupported:
New tests that run and pass: 249

    [6 lines not shown]
DeltaFile
+2-0compiler-rt/test/sanitizer_common/TestCases/sanitizer_coverage_stack_depth.cpp
+2-0compiler-rt/test/sanitizer_common/TestCases/sanitizer_coverage_inline_bool_flag.cpp
+2-0compiler-rt/test/sanitizer_common/TestCases/sanitizer_coverage_inline8bit_counter.cpp
+2-0compiler-rt/test/sanitizer_common/TestCases/sanitizer_coverage_control_flow.cpp
+2-0compiler-rt/test/sanitizer_common/TestCases/max_allocation_size.cpp
+2-0compiler-rt/test/sanitizer_common/TestCases/malloc_hook_get_allocated_size_fast.cpp
+12-036 files not shown
+71-142 files