llvm-project/llvm/test/CodeGen
Tom Stellard 86c944d790 AMDGPU/SILoadStoreOptimizer: Improve merging of out of order offsets
Summary:
This improves merging of sequences like:

store a, ptr + 4
store b, ptr + 8
store c, ptr + 12
store d, ptr + 16
store e, ptr + 20
store f, ptr

Prior to this patch the basic block was scanned in order to find instructions
to merge and the above sequence would be transformed to:

store4 <a, b, c, d>, ptr + 4
store e, ptr + 20
store r, ptr

With this change, we now sort all the candidate merge instructions by their offset,
so instructions are visited in offset order rather than in the order they appear
in the basic block.  We now transform this sequnce into:

store4 <f, a, b, c>, ptr
store2 <d, e>, ptr + 16

Another benefit of this change is that since we have sorted the mergeable lists
by offset, we can easily check if an instruction is mergeable by checking the
offset of the instruction that becomes before or after it in the sorted list.
Once we determine an instruction is not mergeable we can remove it from the list
and avoid having to do the more expensive mergeablilty checks.

Reviewers: arsenm, pendingchaos, rampitec, nhaehnle, vpykhtin

Reviewed By: arsenm, nhaehnle

Subscribers: kerbowa, merge_guards_bot, kzhuravl, jvesely, wdng, yaxunl, dstuttard, tpr, t-tye, hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D65966
2020-01-24 19:45:56 -08:00
..
AArch64 [PatchableFunction] Allow empty entry MachineBasicBlock 2020-01-24 09:42:48 -08:00
AMDGPU AMDGPU/SILoadStoreOptimizer: Improve merging of out of order offsets 2020-01-24 19:45:56 -08:00
ARC
ARM Allow combining of extract_subvector to extract element 2020-01-24 10:50:26 -08: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 REQUIRES: asserts to a testcase using -debug-only 2020-01-21 13:22:01 -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 Consolidate internal denormal flushing controls 2020-01-17 20:09:53 -05:00
PowerPC [PowerPC][Future] Add prefixed instruction paddi to future CPU 2020-01-24 07:27:25 -06:00
RISCV [RISCV] Support ABI checking with per function target-features 2020-01-22 08:12:28 -08:00
SPARC Revert "[Support] make report_fatal_error `abort` instead of `exit`" 2020-01-15 17:52:25 -08:00
SystemZ Update spelling of {analyze,insert,remove}Branch in strings and comments 2020-01-21 10:15:38 -06: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] Use reduction intrinsics for larger than legal reductions 2020-01-24 17:07:24 +00:00
VE [VE] global variable isel patterns 2020-01-24 17:35:14 +01:00
WebAssembly [WebAssembly] Update bleeding-edge CPU features 2020-01-24 14:27:35 -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 [DAGCombiner] Add combine for (not (strict_fsetcc)) to create a strict_fsetcc with the opposite condition. 2020-01-24 14:15:36 -08:00
XCore Revert "[Support] make report_fatal_error `abort` instead of `exit`" 2020-01-15 17:52:25 -08:00