LLVM/project 98500fcllvm/lib/Target/RISCV RISCVInsertVSETVLI.cpp RISCVVSETVLIInfoAnalysis.h, llvm/test/CodeGen/RISCV/rvv sifive-xsfmm-vset-insert.mir

[RISCV] Make SFMM configuration instruction emit like VSETVLI (#196487)

Reuse the PseudoVSETVLI condition instead of its own condition.

---------

Co-authored-by: Luke Lau <luke_lau at icloud.com>
DeltaFile
+12-26llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp
+2-2llvm/test/CodeGen/RISCV/rvv/sifive-xsfmm-vset-insert.mir
+4-0llvm/lib/Target/RISCV/RISCVVSETVLIInfoAnalysis.h
+18-283 files

LLVM/project f6e26cbclang/test/Instrumentor StackUsageRT.cpp StackUsageRT.json

[Instrumentor] Remove brittle clang tests for now (#197350)

This should fix https://github.com/llvm/llvm-project/pull/195378
DeltaFile
+0-60clang/test/Instrumentor/StackUsageRT.cpp
+0-54clang/test/Instrumentor/StackUsageRT.json
+0-37clang/test/Instrumentor/InstrumentorStackUsage.cpp
+0-2clang/test/Instrumentor/lit.local.cfg
+0-1534 files

LLVM/project 8edb0d9llvm/include/llvm/MC DXContainerInfo.h, llvm/lib/MC DXContainerInfo.cpp

Revert "[DirectX][ObjectYAML] Add ILDN part support" (#197348)

Reverts llvm/llvm-project#194508 due to
1. Compilation error on older cl.exe versions due to having a field
"DebugName" as a member of class "DebugName".
2. Layout violation between MC and Object
(see https://github.com/llvm/llvm-project/pull/197343).
DeltaFile
+0-64llvm/test/tools/obj2yaml/DXContainer/ILDNPart.yaml
+2-46llvm/lib/Object/DXContainer.cpp
+0-41llvm/lib/MC/DXContainerInfo.cpp
+0-36llvm/unittests/Object/DXContainerTest.cpp
+0-33llvm/unittests/ObjectYAML/DXContainerYAMLTest.cpp
+0-32llvm/include/llvm/MC/DXContainerInfo.h
+2-25211 files not shown
+2-39317 files

LLVM/project 263b78fllvm/lib/Target/RISCV/GISel RISCVInstructionSelector.cpp

[RISCV][GISel] Use getZExtValue() instead of getLimitedValue(). NFC (#196638)

The constants here should be 64 bits or less.
DeltaFile
+7-7llvm/lib/Target/RISCV/GISel/RISCVInstructionSelector.cpp
+7-71 files

LLVM/project 37a9cf4libc/src/__support/CPP bit.h, libc/src/__support/macros attributes.h

[libc][NFC] Increase minimum GCC version for `LIBC_CONSTEXPR` to 11 (#197333)
DeltaFile
+12-9libc/src/__support/CPP/bit.h
+1-1libc/src/__support/macros/attributes.h
+13-102 files

LLVM/project 9cd33f8utils/bazel/llvm-project-overlay/libc BUILD.bazel, utils/bazel/llvm-project-overlay/llvm BUILD.bazel

[libc] Port 2b2a63819f9f26d661bad5c269a03077d22ff6b4 (#197337)
DeltaFile
+506-1utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+1-0utils/bazel/llvm-project-overlay/llvm/BUILD.bazel
+507-12 files

LLVM/project 9908f7eclang/lib/Headers intrin.h, clang/test/Headers ms-intrin.cpp

[clang] Align x86 CR/DR intrinsic declarations with MSVC (#196886)

Align CR/DR and related MSR intrinsic declarations in intrin.h with
MSVC's x86/x64 signatures

Fixes #185457
DeltaFile
+45-0clang/test/Headers/ms-intrin.cpp
+14-10clang/lib/Headers/intrin.h
+59-102 files

LLVM/project 9b6e77dlibclc CMakeLists.txt

[libclc] Apply hidden visibility to amdgpu / nvptx builds (#197235)

Summary:
    This is not currently used because we force `--internalize` for
llvm-link, but if you ever want to link this normally we'd need hidden
visibility. SPIR-V does not currently handle hidden visibility, as it is
    an extension still under discussion, so it is omitted for now.
DeltaFile
+4-0libclc/CMakeLists.txt
+4-01 files

LLVM/project 4106333libclc/cmake/modules AddLibclc.cmake

[libclc] Create a static `.a` file in addition to the `.bc` file (#197247)

Summary:
This changes the libraries to be object libraries instead of static
libraries. We can then just link these into final static libraries that
contain everything we need.

The desire here is that we'd need static libraries if we wanted to move
away from `-mlink-builtin-bitcode` appraoches.

Effectively we'll have `libclc.a` next to `libclc.bc` and the idea is
that we could alternatively link it and let the target linker handle it.
DeltaFile
+43-53libclc/cmake/modules/AddLibclc.cmake
+43-531 files

LLVM/project 5aa86b7llvm/include/llvm/CodeGen MIRYamlMapping.h, llvm/lib/CodeGen MIRPrinter.cpp

[MIR] Save internal VirtRegMap state in MIR

Adds two optional fields to the per-vreg YAML record so MIR tests can
express VirtRegMap state that previously had no representation:

  registers:
    - { id: 1, class: vgpr_32, split-from: '%0', assigned-phys: '$vgpr5' }

Testing passes that consume sibling-register information (e.g.
InlineSpiller) requires constructing a VirtRegMap with split
relationships from a MIR test, which implies triggering live-range
splitting at minimum and make reproducers unnecessarily complicated.

So this change introduces a mechanism to serialize/deserialize the state
of the VirtRegMap pass.

Mechanism:
- For serialization:
  - MIRPrinter emits the new fields only when the new -mir-emit-vrm

    [16 lines not shown]
DeltaFile
+48-0llvm/lib/CodeGen/MIRParser/MIRParser.cpp
+30-8llvm/lib/CodeGen/MIRPrinter.cpp
+32-0llvm/test/CodeGen/MIR/AMDGPU/virtregmap-stash.mir
+18-0llvm/test/CodeGen/MIR/AMDGPU/virtregmap-stash-bad-phys.mir
+17-1llvm/include/llvm/CodeGen/MIRYamlMapping.h
+17-0llvm/test/CodeGen/MIR/AMDGPU/virtregmap-stash-self-split.mir
+162-95 files not shown
+221-1311 files

LLVM/project 4baa5aallvm/test/CodeGen/AMDGPU regalloc-hoist-spill-live-range-upd.ll regalloc-hoist-spill-live-range-upd.mir

[AMDGPU][test] Use mir test for regalloc issue

Use the newly introduced split-from flag to produce a more robust test case
for the hoistSpillInsideBB live-range update issue.

NFC

DeltaFile
+0-2,870llvm/test/CodeGen/AMDGPU/regalloc-hoist-spill-live-range-upd.ll
+71-0llvm/test/CodeGen/AMDGPU/regalloc-hoist-spill-live-range-upd.mir
+71-2,8702 files

LLVM/project f5069ffllvm/test/CodeGen/AMDGPU splitkit-copy-live-lanes.mir ra-inserted-scalar-instructions.mir, llvm/test/CodeGen/X86 statepoint-invoke-ra-inline-spiller.mir

[MIR] Serialize/Deserialize MachineInstr::LRSplit attribute

The LRSplit MachineInstr flag is set by SplitKit on copies inserted for
live-range splitting.
Until now the flag had no MIR-text representation.

This patch fixes that so that it gets easier to reproduce/capture issues
that involves SplitKit.

Round-trip coverage in
llvm/test/CodeGen/MIR/AMDGPU/lr-split-flag.mir.
DeltaFile
+168-168llvm/test/CodeGen/AMDGPU/splitkit-copy-live-lanes.mir
+36-36llvm/test/CodeGen/AMDGPU/ra-inserted-scalar-instructions.mir
+32-32llvm/test/CodeGen/AMDGPU/splitkit-copy-bundle.mir
+27-27llvm/test/CodeGen/AMDGPU/ran-out-of-sgprs-allocation-failure.mir
+22-22llvm/test/CodeGen/X86/statepoint-invoke-ra-inline-spiller.mir
+22-22llvm/test/CodeGen/AMDGPU/inflated-reg-class-snippet-copy-use-after-free.mir
+307-30731 files not shown
+436-40237 files

LLVM/project a770be7llvm/lib/CodeGen MachineBlockHashInfo.cpp, llvm/test/CodeGen/X86 machine-block-hash.mir

[CodeGen] Increase offset when calculating MBB hash (#196536)

Initially I was refactoring the test to not constantly update the hash
values for new GlobalISel nodes but I noticed that Offset is always zero
and assumed it should've been increased after each MBB. Fixing the
constant offset during MBB hash calculation.

---------

Co-authored-by: Vitaly Buka <vitalybuka at google.com>
DeltaFile
+4-4llvm/test/CodeGen/X86/machine-block-hash.mir
+2-1llvm/lib/CodeGen/MachineBlockHashInfo.cpp
+6-52 files

LLVM/project de4d7a0clang/include/clang/Basic DiagnosticFrontendKinds.td, clang/lib/Basic/Targets SPIR.h

[OpenCL] Allow spirv-unknown-vulkan without shader stage environment (#197144)

Fix libclc spirv-unknown-vulkan target build error: `SPIR-V target
requires a valid shader stage environment`.

libclc clspv triple was canonicalized to `spirv-unknown-vulkan` in
6ef9671. Relax the restriction for libclc which is an OpenCL library
that a specific shader stage is not made yet.
DeltaFile
+8-0clang/test/CodeGen/target-data.c
+8-0clang/test/Driver/spirv-toolchain.cl
+4-3clang/lib/Basic/Targets/SPIR.h
+2-2clang/include/clang/Basic/DiagnosticFrontendKinds.td
+1-1clang/test/Frontend/spirv-target-validation.c
+23-65 files

LLVM/project d66d8c8clang/lib/ScalableStaticAnalysisFramework/Analyses/EntityPointerLevel EntityPointerLevel.cpp

remove irrelevant change
DeltaFile
+0-1clang/lib/ScalableStaticAnalysisFramework/Analyses/EntityPointerLevel/EntityPointerLevel.cpp
+0-11 files

LLVM/project 6734c8cllvm/lib/Target/AArch64 AArch64TargetMachine.cpp AArch64TargetMachine.h

[NFC][AArch64] Extracted AArch64PassConfig::isGlobalISelOptNone (#196856)

Extracts AArch64PassConfig::isGlobalISelOptNone into a AArch64TargetMachine, as suggested in reviews for
https://github.com/llvm/llvm-project/pull/194156

This will help with NewPM porting since this functionality is required
in NewPM orchestration.
DeltaFile
+16-22llvm/lib/Target/AArch64/AArch64TargetMachine.cpp
+7-0llvm/lib/Target/AArch64/AArch64TargetMachine.h
+23-222 files

LLVM/project 6e7bc01lldb/source/Commands CommandObjectBreakpoint.cpp, lldb/source/Target Target.cpp

Adds GetOptions to CommandObjectBreakpointOverride{List, Delete}. (#197340)

This was causing flaky behavior in TestOverridesResolver.py.

I found this with ASAN, which also didn't like that I was running find
with begin() & end() of an empty std::vector. That surprised me a bit,
but its easy to avoid, so I also changed that here.
DeltaFile
+4-0lldb/source/Commands/CommandObjectBreakpoint.cpp
+1-1lldb/source/Target/Target.cpp
+5-12 files

LLVM/project a030b24llvm/lib/Target/LoongArch/MCTargetDesc LoongArchAsmBackend.cpp, llvm/test/MC/LoongArch/Relocations sub-expr.s

[LoongArch] Use fallback path when relocation `SymA == nullptr` (#196940)

This PR adds a fallback path for `SymA == nullptr && SymB != nullptr`
relocations. This prevents a null pointer dereference when trying to
assemble such an instruction.

Related unit tests are also updated to reflect this change.

Fixes #196927.

---
**v2** (9aabcf3b49e620d1ee49e3a29d7a85adadf13580):
* Add some inline comments as suggested by @wangleiat.
DeltaFile
+6-0llvm/test/MC/LoongArch/Relocations/sub-expr.s
+5-0llvm/lib/Target/LoongArch/MCTargetDesc/LoongArchAsmBackend.cpp
+11-02 files

LLVM/project 2293098libc/src/__support/CPP bit.h

remove qualifier
DeltaFile
+6-7libc/src/__support/CPP/bit.h
+6-71 files

LLVM/project 8df70b2clang/test/Instrumentor UnreachableRT.cpp InstrumentorUnreachable.cpp, llvm/include/llvm/Transforms/IPO Instrumentor.h

[Instrumentor] Add unreachable support; unreachable stack trace printing

Allow to instrument unreachable and provide a use case to identify an
unreachable was reached.
DeltaFile
+22-0clang/test/Instrumentor/UnreachableRT.cpp
+21-0llvm/include/llvm/Transforms/IPO/Instrumentor.h
+20-0clang/test/Instrumentor/InstrumentorUnreachable.cpp
+15-0clang/test/Instrumentor/UnreachableRT.json
+12-0llvm/lib/Transforms/IPO/Instrumentor.cpp
+5-1clang/test/Instrumentor/lit.local.cfg
+95-11 files not shown
+100-17 files

LLVM/project d6f65c4llvm/test/CodeGen/AArch64 bf16-v8-instructions.ll, llvm/test/CodeGen/X86 vector-reduce-ctpop.ll

Merge remote-tracking branch 'origin/main' into users/ziqingluo/PR-174874942-3-followup

 Conflicts:
        clang/lib/ScalableStaticAnalysisFramework/Analyses/EntityPointerLevel/EntityPointerLevel.cpp
        clang/lib/ScalableStaticAnalysisFramework/Analyses/PointerFlow/PointerFlowAnalysis.cpp
        clang/lib/ScalableStaticAnalysisFramework/Analyses/PointerFlow/PointerFlowExtractor.cpp
        clang/lib/ScalableStaticAnalysisFramework/Analyses/PointerFlow/PointerFlowFormat.cpp
        clang/lib/ScalableStaticAnalysisFramework/Analyses/UnsafeBufferUsage/UnsafeBufferUsageFormat.cpp
        clang/test/Analysis/Scalable/PointerFlow/tu-summary-serialization.test
        clang/unittests/ScalableStaticAnalysisFramework/Analyses/PointerFlow/PointerFlowTest.cpp
        clang/unittests/ScalableStaticAnalysisFramework/Analyses/UnsafeBufferUsage/UnsafeBufferUsageTest.cpp
        clang/unittests/ScalableStaticAnalysisFramework/WholeProgramAnalysis/UnsafeBufferReachableAnalysisTest.cpp
DeltaFile
+7,584-740llvm/test/CodeGen/AArch64/bf16-v8-instructions.ll
+8,195-0llvm/test/MC/AMDGPU/gfx13_asm_vop3.s
+8,182-0llvm/test/MC/AMDGPU/gfx13_asm_vop3-fake16.s
+6,873-0llvm/test/tools/llvm-mca/AArch64/Cortex/C1Premium-sve-instructions.s
+6,862-0llvm/test/tools/llvm-mca/AArch64/Cortex/C1Nano-sve-instructions.s
+4,686-918llvm/test/CodeGen/X86/vector-reduce-ctpop.ll
+42,382-1,6586,998 files not shown
+351,392-120,5647,004 files

LLVM/project a2edf76libc/src/__support/CPP bit.h

fix ci
DeltaFile
+8-4libc/src/__support/CPP/bit.h
+8-41 files

LLVM/project bd3ad40clang/test/Instrumentor StackUsageRT.cpp StackUsageRT.json, llvm/include/llvm/Transforms/IPO Instrumentor.h

[Instrumentor] Add Alloca and Function support; stack usage example (#195378)

This adds support for alloca instrumentation and function pre/post
instrumentation. Alloca support follows load/store support directly.
Functions require special care to determine the insertion points.

Together, we can showcase how the stack high watermark can be profiled,
see InstrumentorStackUsage.cpp.
DeltaFile
+306-8llvm/lib/Transforms/IPO/Instrumentor.cpp
+127-11llvm/include/llvm/Transforms/IPO/Instrumentor.h
+60-0clang/test/Instrumentor/StackUsageRT.cpp
+59-0llvm/test/Instrumentation/Instrumentor/default_config.json
+57-0llvm/test/Instrumentation/Instrumentor/alloca_and_function.ll
+54-0clang/test/Instrumentor/StackUsageRT.json
+663-195 files not shown
+721-2711 files

LLVM/project e8c6318utils/bazel/llvm-project-overlay/libc BUILD.bazel

[Bazel] Drop :errno use from some libc math support libraries (#197336)

We only actually need the errno header. Using errno as a dependency
pulls in a c++ source file which requires compilation which precludes
use in a header library.
DeltaFile
+0-4utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+0-41 files

LLVM/project 86f7e93llvm/lib/Transforms/Vectorize SLPVectorizer.cpp, llvm/test/Transforms/SLPVectorizer/X86 revec-constant-reduction.ll

[SLP] Check candidates instead of instructionsstate for reduction type in revec mode

Better to ceheck the first candidate instead of InstructionsState, since
it might be non-valid for constants.

Fixes https://github.com/llvm/llvm-project/pull/197291#issuecomment-4435105325

Reviewers: 

Pull Request: https://github.com/llvm/llvm-project/pull/197335
DeltaFile
+24-0llvm/test/Transforms/SLPVectorizer/X86/revec-constant-reduction.ll
+1-1llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+25-12 files

LLVM/project add7a0eflang/include/flang/Support Fortran-features.h, flang/lib/Semantics resolve-names.cpp

[flang][cuda] Add support for -gpu=pinned (#197304)

Add a new language feature to implicitly treat dynamic allocation as
pinned allocation.
DeltaFile
+20-11flang/lib/Semantics/resolve-names.cpp
+16-0flang/test/Lower/CUDA/cuda-gpu-pinned.f90
+4-1flang/tools/bbc/bbc.cpp
+1-1flang/include/flang/Support/Fortran-features.h
+1-0flang/lib/Support/Fortran-features.cpp
+42-135 files

LLVM/project 90a2820clang/include/clang/Serialization ASTRecordReader.h, clang/lib/AST ASTContext.cpp Type.cpp

trivial changes
DeltaFile
+20-14clang/lib/Sema/SemaOpenMP.cpp
+18-14clang/lib/AST/ASTContext.cpp
+16-15clang/lib/Sema/SemaTemplate.cpp
+14-11clang/lib/AST/Type.cpp
+14-8clang/lib/AST/ASTDiagnostic.cpp
+11-6clang/include/clang/Serialization/ASTRecordReader.h
+93-6833 files not shown
+202-15239 files

LLVM/project 12d386dclang/include/clang/AST ASTContext.h, clang/lib/AST ASTContext.cpp ItaniumMangle.cpp

[clang] implement CWG2064: ignore value dependence for decltype

The 'decltype' for a value-dependent (but non-type-dependent) should be known,
so this patch makes them non-opaque instead.

This patch also implements what's neceessary to allow overloading
on pure differences in instantiation dependence, making `std::void_t`
usable for SFINAE purposes.

This also readds a few test cases from da98651, which was a previous attempt
at resolving CWG2064.

Fixes #8740
Fixes #61818
Fixes #190388
DeltaFile
+888-161clang/lib/AST/ASTContext.cpp
+328-12clang/test/SemaTemplate/instantiation-dependence.cpp
+176-96clang/lib/AST/ItaniumMangle.cpp
+100-98clang/lib/Sema/SemaCXXScopeSpec.cpp
+62-57clang/lib/AST/Type.cpp
+88-11clang/include/clang/AST/ASTContext.h
+1,642-43570 files not shown
+2,398-78876 files

LLVM/project 3938a37clang/lib/Serialization ASTReader.cpp, clang/test/ClangScanDeps build-session-validation-relocated-modules.c

[clang][Modules] Use strict comparison at build-session validation boundary (#197203)

The relocation check used `IFVT >= session` while input validation used
`IFVT > session`, silently skipping the relocation check when both
landed in the same truncated second. Share a single helper with the
strict comparison. This was noticed when the accompanying test was flaky
on green dragon macOS bot.

Also:

* Drop the test's `sleep 1` timing dependency by future-dating the
session timestamp directly.
* Remove the dead `touch %t/session.timestamp` lines in the
ClangScanDeps test (the scanner ignores the file's mtime).

hopefully resolves: rdar://173816745
DeltaFile
+21-9clang/lib/Serialization/ASTReader.cpp
+3-5clang/test/Modules/build-session-validation-relocated-modules.c
+2-2clang/test/ClangScanDeps/build-session-validation-relocated-modules.c
+26-163 files

LLVM/project dc41adeclang/include/clang/Serialization ASTRecordReader.h, clang/lib/AST ASTContext.cpp Type.cpp

trivial changes
DeltaFile
+20-14clang/lib/Sema/SemaOpenMP.cpp
+18-14clang/lib/AST/ASTContext.cpp
+16-15clang/lib/Sema/SemaTemplate.cpp
+14-11clang/lib/AST/Type.cpp
+14-8clang/lib/AST/ASTDiagnostic.cpp
+11-6clang/include/clang/Serialization/ASTRecordReader.h
+93-6833 files not shown
+202-15239 files