Improve llvm-gsymutil to set the end address correctly. (#225593)
When converting DWARF in llvm-gsymutil, if the last function info had no
size, it would set it to the end of the valid text ranges. This meant a
symbol could get a larger than necessary size in mach-o files. This
patch will set the address to the minimum of the last TextRanges or the
end of the section that contains the symbol.
[LFI][X86] Add control-flow rewrites (#210913)
This adds LFI rewrites for control-flow operations. All jumps and
calls are rewritten so that their target is both guaranteed to be within
the sandbox, and at an address that is a multiple of the bundle size.
When combined with bundling, this restricts control-flow to the sandbox
region.
With Intel MPK support, this can provide a complete sandbox. A future
patch will also introduce software-based memory sandboxing so that MPK
is not required for memory isolation.
[SLP] Use getRegUsageForType() rather than getNumberOfParts() when determining reduction width (#226277)
`getRegUsageForType()` is more appropriate for comparison to total
number of registers. `getNumberOfParts()` is legalization cost based,
but in this situation, we are looking to make sure we don't create
vectors that are widen than the register file can handle.
[SCCP] Give SimplifyInst a chance in visitCmpInst
I was inspired by my previous work on BinOps optimization. It is
possible to perform the optimization even if one of the operands is not
a constant.
[RegAlloc] Add register allocation anti-hints infrastructure (#218071)
This PR adds a RA anti-hint mechanism. MachineRegisterInfo is extended
to track anti-hints
between vregs to try avoiding to be allocated on the same physical
register. AllocationOrder can
queries these and also allows the target reorder the allocation order
through the new
TargetRegisterInfo::applyRegAllocationAntiHints hook. The default
implementation moves
the anti-hinted registers to the end of the order, so they are only used
as a last option.
## Stack
PR **1/4**. Next: MIR serialization #218073.
[Github] Add LLVM-libc's full-build to Bazel Checks workflow
This PR adds a job to run `bazelisk test --@llvm-project//libc:build_mode=full @llvm-project//libc/...`. It is part of an effort to support LLVM-libc's full build functionality in Bazel.
[llvm-jitlink] Add -show-jit-result option (#226149)
Add a -show-jit-result option that prints the int result of the JIT'd
main / entry function to stdout as:
JIT result: <return value>
This makes the result of the JIT'd main / entry function FileCheck-able,
and distinguishable from an llvm-jitlink failure.
This will be used in upcoming ORC runtime tests.
Since we don't currently run code under llvm-jitlink in LLVM regression
tests, this commit does not include an LLVM-side test.
[mlir] Constant-initialize registered operation hook tables (NFC) (#226320)
Make the generic operation hook accessors constexpr so registered
operation hook tables can be constant-initialized. Keep the table
declared static const to support non-constexpr downstream overrides.
In OpenMPDialect.cpp this removes 72 initialization guards and 10,368
bytes of object text, and saves about 0.56B compiler instructions.
Assisted-by: Codex