llvm-project/llvm/test/CodeGen
Evgenii Stepanov d081962dea Merge memtag instructions with adjacent stack slots.
Summary:
Detect a run of memory tagging instructions for adjacent stack frame slots,
and replace them with a shorter instruction sequence
* replace STG + STG with ST2G
* replace STGloop + STGloop with STGloop

This code needs to run when stack slot offsets are already known, but before
FrameIndex operands in STG instructions are eliminated; that's the
reason for the new hook in PrologueEpilogue.

This change modifies STGloop and STZGloop pseudos to take the size as an
immediate integer operand, and adds _untied variants of those pseudos
that are allowed to take the base address as a FI operand. This is needed to
simplify recognizing an STGloop instruction as operating on a stack slot
post-regalloc.

This improves memtag code size by ~0.25%, and it looks like an additional ~0.1%
is possible by rearranging the stack frame such that consecutive STG
instructions reference adjacent slots (patch pending).

Reviewers: pcc, ostannard

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D70286
2020-01-17 15:19:29 -08:00
..
AArch64 Merge memtag instructions with adjacent stack slots. 2020-01-17 15:19:29 -08:00
AMDGPU [AMDGPU] allow multi-dword flat scratch access since GFX9 2020-01-17 10:47:03 -08:00
ARC
ARM llc: Don't overwrite frame-pointer attribute 2020-01-15 20:56:46 -05:00
AVR [AVR] Fix codegen for rotate instructions 2019-12-23 11:41:28 +08:00
BPF Revert "[Support] make report_fatal_error `abort` instead of `exit`" 2020-01-15 17:52:25 -08:00
Generic Revert "[Support] make report_fatal_error `abort` instead of `exit`" 2020-01-15 17:52:25 -08:00
Hexagon [Hexagon] Add a target feature to disable compound instructions 2020-01-16 12:37:30 -06:00
Inputs
Lanai Revert "[Support] make report_fatal_error `abort` instead of `exit`" 2020-01-15 17:52:25 -08:00
MIR Revert "[Support] make report_fatal_error `abort` instead of `exit`" 2020-01-15 17:52:25 -08:00
MSP430 Migrate function attribute "no-frame-pointer-elim"="false" to "frame-pointer"="none" as cleanups after D56351 2019-12-24 16:27:51 -08:00
Mips [LegalizeDAG][Mips] Add an assert to protect a uint_to_fp implementation from double rounding. Add a i32->f32 uint_to_fp implementation that avoids this code. 2020-01-16 11:08:16 -08:00
NVPTX Revert "[Support] make report_fatal_error `abort` instead of `exit`" 2020-01-15 17:52:25 -08:00
PowerPC Revert "[Support] make report_fatal_error `abort` instead of `exit`" 2020-01-15 17:52:25 -08:00
RISCV Revert "[RISCV] Support ABI checking with per function target-features" 2020-01-16 18:01:07 -08:00
SPARC Revert "[Support] make report_fatal_error `abort` instead of `exit`" 2020-01-15 17:52:25 -08:00
SystemZ Revert "[Support] make report_fatal_error `abort` instead of `exit`" 2020-01-15 17:52:25 -08:00
Thumb [Thumb][test] Fix CodeGen/Thumb/PR17309.ll after llvmorg-10-init-16046-ga36ddf0aa9d 2019-12-24 16:58:12 -08:00
Thumb2 [ARM][MVE] Tail Predicate IsSafeToRemove 2020-01-17 13:19:14 +00:00
VE [VE] i64 arguments, return values and constants 2020-01-16 10:09:50 +01:00
WebAssembly Revert "[WebAssembly] Track frame registers through VReg and local allocation" 2020-01-16 14:38:00 -08:00
WinCFGuard Migrate function attribute "no-frame-pointer-elim"="false" to "frame-pointer"="none" as cleanups after D56351 2019-12-24 16:27:51 -08:00
WinEH Migrate function attribute "no-frame-pointer-elim"="false" to "frame-pointer"="none" as cleanups after D56351 2019-12-24 16:27:51 -08:00
X86 [xray] Allow instrumenting only function entry and/or only function exit 2020-01-17 13:32:34 -08:00
XCore Revert "[Support] make report_fatal_error `abort` instead of `exit`" 2020-01-15 17:52:25 -08:00