[mlir][bufferization][NFC] Add convenience overload for `buildBufferDeallocationPipeline` (#171305)
Add an overload that does not take any options and uses the default
options instead.
[VPlan] Remove ExtractLastLane for plans with scalar VFs. (#171145)
ExtractLastLane is a no-op for scalar VFs. Update simplifyRecipe to
remove them. This also requires adjusting the code in VPlanUnroll.cpp to
split off handling of ExtractLastLane/ExtractPenultimateElement for
scalar VFs, which now needs to match ExtractLastPart.
PR: https://github.com/llvm/llvm-project/pull/171145
[BOLT][BTI] Add needed BTIs in LongJmp or refuse to optimize binary
This patch adds BTI landing pads to ShortJmp/LongJmp targets in the
LongJmp pass when optimizing BTI binaries.
BOLT does not have the ability to add BTI to all types of functions.
This patch aims to insert the landing pad where possible, and emit an
error where it currently is not.
BOLT cannot insert BTIs into several function "types", including:
- ignored functions,
- PLT functions,
- other functions without a CFG.
Additional context:
In #161206, BOLT gained the ability to decode the .note.gnu.property
section, and warn about lack of BTI support for BOLT. However, this
warning is misleading: the emitted binary may not need extra BTI landing
[3 lines not shown]
[Flang] Move builtin .mod generation into runtimes (Reapply #137828) (#169638)
Reapplication of #137828, changes:
* Workaround CMAKE_Fortran_PREPROCESS_SOURCE issue for CMake < 2.24: The
issue is that `try_compile` does not forward manually-defined compiler
flang variables to the test build environment; instead of just a
negative test result, it aborts the configuration step itself. To be
fair, manually defining these variables is deprecated since at least
CMake 3.6.
* Missing flang cmd line flags for CMake < 3.28 `-target=`, `-O2`, `-O3`
* It is now possible to set FLANG_RT_ENABLED_STATIC=OFF and
FLANG_RT_ENABLE_SHARED=OFF at the same and is the default for amdgpu and
nvptx targets. In this mode, only the .mod files are compiled --
necessary for module files in
lib/clang/22/finclude/flang/(nvptx64-nvidia-cuda|amdgpu-amd-amdhsa)/*.mod
to be available.
* For compiling omp_lib.mod for nvptx and amdgpu, the module build
functionality must be hoisted out if openmp's runtime/ directory which
is only included for host targets. This PR now requires #169909.
[72 lines not shown]
llvm: Export EliminateNewDuplicatePHINodes (#169564)
This is needed for tests, when building with `LLVM_BUILD_LLVM_DYLIB` so
LLVM can be built as a DLL on Windows.
This effort is tracked in #109483.
[LTO][Veclib] Fix vector library handling with LTO (#170638)
Commit #167996 moved VecLib into TargetOptions and ensured clang
properly sets it. However, some LTO backend code paths were still
creating _TargetLibraryInfoImpl_ without passing the VecLib parameter
from `TargetMachine::Options`.
This PR completes the fix by ensuring that:
_LTOBackend.cpp, ThinLTOCodeGenerator.cpp, UpdateCompilerUsed.cpp_ all
pass `TM->Options.VecLib` when constructing _TargetLibraryInfoImpl_.
Without this fix, vector library information (e.g., -fveclib=ArmPL)
would not be properly recognized during LTO optimization and code
generation, potentially causing incorrect optimizations or linker errors
when vector library functions are referenced.
[BOLT][BTI] Add needed BTIs in LongJmp or refuse to optimize binary
This patch adds BTI landing pads to ShortJmp/LongJmp targets in the
LongJmp pass when optimizing BTI binaries.
BOLT does not have the ability to add BTI to all types of functions.
This patch aims to insert the landing pad where possible, and emit an
error where it currently is not.
BOLT cannot insert BTIs into several function "types", including:
- ignored functions,
- PLT functions,
- other functions without a CFG.
Additional context:
In #161206, BOLT gained the ability to decode the .note.gnu.property
section, and warn about lack of BTI support for BOLT. However, this
warning is misleading: the emitted binary may not need extra BTI landing
[3 lines not shown]
[Dexter] Adjust launch sequencing to align closer with DAP spec (#170523)
Following PR #169744 the DAP launch sequencing of Dexter was changed to
complete a launch request/response before performing configuration
steps. This matches LLDB's current behaviour, but is not compatible with
the DAP specification and causes issues interfacing with other
debuggers.
This patch tries to bridge the gap by using a sequencing that is mostly
DAP-compliant while still interfacing correctly with lldb-dap: we send a
launch request first, then perform all configuration steps and send
configurationDone, and then await the launch response. For lldb-dap, we
do not wait for the launch response and may send configuration requests
before it is received, but lldb-dap appears to handle this without
issue. For other debug adapters, the launch request will be ignored
until the configurationDone request is received and responded to, at
which point the launch request will be acted upon and responded to.
As an additional note, the initialized event should be sent after the
[5 lines not shown]
[sancov] Add -union option to merge multiple sancov files
Add a new -union action that computes the union of multiple sancov
coverage files and writes the result to a new .sancov file.
The option takes one or more input .sancov files and requires an
--output option to specify the output file. The output file preserves
the binary format (magic number and bitness) from the first input file.
A warning is emitted if any input file has different bitness (32-bit
vs 64-bit) than the first file, though the operation proceeds using
the bitness from the first file.
[AArch64][GlobalISel] Added support for neon left shift intrinsics on single-element vector types (#170827)
Previously, the left shift family of intrinsics would fail to lower for
<1 x i64> / <1 x i32> vector types, as IRTranslation lowers these to
scalars. Marking these intrinsics as only using fp operands ensures the
RegBankSelect phase places the vector on an fpr bank, instead of a gpr
bank.
[BOLT][BTI] Add needed BTIs in LongJmp or refuse to optimize binary
This patch adds BTI landing pads to ShortJmp/LongJmp targets in the
LongJmp pass when optimizing BTI binaries.
BOLT does not have the ability to add BTI to all types of functions.
This patch aims to insert the landing pad where possible, and emit an
error where it currently is not.
BOLT cannot insert BTIs into several function "types", including:
- ignored functions,
- PLT functions,
- other functions without a CFG.
Additional context:
In #161206, BOLT gained the ability to decode the .note.gnu.property
section, and warn about lack of BTI support for BOLT. However, this
warning is misleading: the emitted binary may not need extra BTI landing
[3 lines not shown]
[JITLink] Add orc-runtime support for SystemZ (#171062)
Add orc-runtime support and tests for SystemZ.
Co-authored-by: anoopkg6 <anoopkg6 at github.com>
[llvm] Use ConstantInt::getAllOnesValue()
Prefer getAllOnesValue() over get(-1). This is good practice to
avoid issues with sign extension for large types.
[BOLT] Fix pacret-synchronous-unwind.cpp test
The test case build a binary from C++, and checks for the number of
functions the PointerAuthCFIFixup pass runs on.
This can change based on the platform. To account for this, the patch
changes the number to a regex.
[sancov] Add -diff option to compute set difference of sancov files
Add a new -diff action that computes the difference between two sancov
coverage files (A - B) and writes the result to a new .sancov file.
The option takes exactly two input .sancov files and requires an
--output option to specify the output file. The output file preserves
the binary format (magic number and bitness) from the first input file.
A warning is emitted if the two input files have different bitness
(32-bit vs 64-bit), though the operation proceeds using the bitness
from file A.
[clang-tidy] Rename `google-readability-casting` to `modernize-avoid-c-style-cast` (#171058)
Rename `google-readability-casting` to `modernize-avoid-c-style-cast`
The old name is kept as an alias for backward compatibility.
Fixes #170978