[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>
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).
[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
[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.
[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.
[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]
[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
[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.
[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>
[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.
[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.
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.
[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.
[Instrumentor] Add unreachable support; unreachable stack trace printing
Allow to instrument unreachable and provide a use case to identify an
unreachable was reached.
[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.
[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.
[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
[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