[DirectX] Delay converting to old-style debug info (#201336)
This has no impact at the moment, but upcoming work relies on debug info
still using new-style debug records after DXILPrepare.
[lldb][NativePDB] Remove uses of cantFail in AST builder (#200452)
As a continuation of #187158, this removes uses of `llvm::cantFail` and
replaces them with logs and early returns.
The motivation for this is the PDB of the
[ExprLanguageNote.test](https://github.com/llvm/llvm-project/blob/c241374079f12aabe5d1db5133cb5d924a3cc1d6/lldb/test/Shell/Expr/TestExprLanguageNote.test).
It's incrementally linked (if the built clang uses link.exe by default).
After some amount of checkouts + rebuilds, the PDB gets (semantically)
corrupted such that some type indices point to incorrect records. While
this is a bug in the MSVC linker, we shouldn't crash if we get these
inputs.
[mlir][acc] Add reduction accumulate operation (#201954)
Introduce `acc.reduction_accumulate` to represent merging an SSA result
into storage (typically the private memory storage) which will then be
used to combine into the final destination storage.
[flang][OpenMP] Lower target in_reduction for host fallback
Teach Flang lowering and MLIR OpenMP translation to carry
in_reduction through omp.target for the host-fallback path.
The translation looks up task reduction-private storage with
__kmpc_task_reduction_get_th_data and binds the target region's
in_reduction block argument to that private pointer, so uses inside the
region do not keep referring to the original variable.
The patch also preserves in_reduction operands in the TargetOp builder
path and ensures target in_reduction list items are mapped into the
target region when needed.
The device/offload-entry path remains diagnosed as not yet implemented.
[VPlan] Rename VPIRFlags::getFastMathFlags (NFC) (#200487)
Rename it to getFastMathFlagsOrNone, in line with the recently-landed IR
change 02997d759 ([IR] Introduce Instruction::getFastMathFlagsOrNone,
#200457).
[LLVM][Runtimes] Fix path attempting to install to wrong location (#202352)
Summary:
When LLVM_BINARY_DIR was not set this should default to a root location
and configuration would fail by trying to write to some random system
location with insufficient perms.
Fixes the failure introduced in
https://github.com/llvm/llvm-project/commit/b4f5ae234c6d
[DirectX] Write DXIL with debug info to ILDB part (#201423)
This patch writes bitcode with debug info to ILDB part, then strips that
bitcode from all debug info and writes it to DXIL part.
Note: as of now, `StripDebugInfo` doesn't remove all the debug info, but
this will be fixed in #201336 and doesn't affect this patch.
AMDGPU/GlobalISel: RegBankLegalize rules for cvt f16<->fp8/bf8
Small types are impemented using integers in LLVMIR,
because of this there are no irtranslator failures.
[NFC][AMDGPU][VOPD] Add lit test demonstrating current VOPD pairing behaviour (#201943)
This is a pre-commit test for #201930
The behaviour addressed loc cit is the `global_load_b128 v[2:5]`
corresponding to `%A.load` being followed immediately by its user due to
VOPDPairingMutation choosing to fuse the address computation for
`%B.load` with the use of `%A.load`.
[InstCombine][X86] Fold add(vpmadd52(0, a, b), x) -> vpmadd52(x, a, b) (#195937)
vpmadd52 computes acc + P(a, b) mod 2^64 where P is independent of acc
so add(vpmadd52(0, a, b), x) = vpmadd52(x, a, b).
Applies to all six vpmadd52{h,l}.uq.{128,256,512} variants.
Fixes #194697
[ARM] Remove llvm/test/MC/COFF/ARM/lit.local.cfg. NFC (#202342)
Given there are no files in this folder (since
ff1d084aa2f07927f3c63c93f3286822abe9d1ac) the unused lit.local.cfg can
be
removed.
[libc] Add remaining SO_ constants (#202278)
There are two complications here:
- These options have different values on some architectures. These
aren't architectures we're likely to support soon, but I've left a
#error so that it lights up in a porting attempt.
- The time-related options have two flavours, depending on the
sizeof(time_t). Since we now support only 64-bit time_t, and only
kernels newer than 5.10, we can unconditionally use the new versions
(released in 5.1). I added a test for one of the time options to verify
that it works.
[Runtimes] Drop 'flang' from runtimes configure dependency (#198205)
Summary:
This PR cuts `flang` out of the core runtimes configure dependency. We
will need the runtimes infrastructure to handle `flang` module
generation, but this dependency poisons the entire dependency stack.
`flang` and `mlir` are by far the heavily parts of the LLVM stack and
for distribution we want to only build it when absolutely necessary,
which as of now is only to install flang module files.
The approach here is to simply remove the `flang` target from the core
dependency tree, but intead configure it for the top-level `module`
targets which are part of `all`. To make this work we need to pass
COMPILER_WORKS and set up a dummy location so that configuration passes.
it's a little backdoor, but this is an extremely important quality of
life improvement for LLVM distribution support.
[AMDGPU] Drop docs for invalid load-release and store-acquire operations
The LangRef says "release and acq_rel orderings are not valid on load
instructions" [for loads](https://llvm.org/docs/LangRef.html#load-instruction)
and "acquire and acq_rel orderings aren't valid on store instructions"
[for stores](https://llvm.org/docs/LangRef.html#store-instruction).
Providing them in textual IR is diagnosed with an error.
Therefore, we should not define semantics for these invalid constructs.
Part of LCOMPILER-2273.
Revert "[IR] Reject unhandled assume bundles and seperate them from normal attributes" (#202336)
Reverts llvm/llvm-project#197007
This causes an assertion failure.
[clang] Implement C2y stdc_memreverse8 and stdc_memreverse8u{8,16,32,64} builtins (#197358)
Implements the C2y <stdbit.h> memory reversal functions stdc_memreverse8
and stdc_memreverse8u{8,16,32,64}. The typed variants lower to
llvm.bswap and support constexpr evaluation.
[clang][Sema]fix crash of invalid friend declaration with storage-class specifier (#190597)
Fix an assertion failure in Sema::ActOnFriendTypeDecl when parsing an
invalid friend type declaration that incorrectly includes a
storage-class specifier (e.g., 'static', 'extern', 'register').
Root cause:
If the type specifier is marked as invalid, DeclSpec::Finish returns
early. However, even when the type specifier is invalid, some other
checks can still be performed instead of skipping everything.
This change allows necessary checks to proceed, preventing the
assertion in ActOnFriendTypeDecl and enabling proper error diagnostics.
Fixes: https://github.com/llvm/llvm-project/issues/186569
Co-authored-by: victorl <liuvicsen at gmail.com>
[z/OS] Mark 19 tests UNSUPPORTED on z/OS due to an issue in printf. (#196391)
Those tests fail on z/OS because printf interprets octal escape
sequences as EBCDIC characters and converts them to ASCII, producing
incorrect values in the output.