1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-26 14:33:02 +02:00
llvm-mirror/test/CodeGen
Sanjay Patel 29c427c639 [x86] generalize reassociation optimization in machine combiner to 2 instructions
Currently ( D10321, http://reviews.llvm.org/rL239486 ), we can use the machine combiner pass
to reassociate the following sequence to reduce the critical path:

A = ? op ?
B = A op X
C = B op Y
-->
A = ? op ?
B = X op Y
C = A op B

'op' is currently limited to x86 AVX scalar FP adds (with fast-math on), but in theory, it could
be any associative math/logic op (see TODO in code comment).

This patch generalizes the pattern match to ignore the instruction that defines 'A'. So instead of
a sequence of 3 adds, we now only need to find 2 dependent adds and decide if it's worth
reassociating them.

This generalization has a compile-time cost because we can now match more instruction sequences
and we rely more heavily on the machine combiner to discard sequences where reassociation doesn't
improve the critical path.

For example, in the new test case:

A = M div N
B = A add X
C = B add Y

We'll match 2 reassociation patterns, but this transform doesn't reduce the critical path:

A = M div N
B = A add Y
C = B add X

We need the combiner to reject that pattern but select this:

A = M div N
B = X add Y
C = B add A

Differential Revision: http://reviews.llvm.org/D10460

llvm-svn: 240361
2015-06-23 00:39:40 +00:00
..
AArch64 Fix "the the" in comments. 2015-06-19 01:53:21 +00:00
AMDGPU R600/SI: Use ELF64 format instead of ELF32 2015-06-22 21:03:54 +00:00
ARM [ARM] Look through concat when lowering in-place shuffles (VZIP, ..) 2015-06-19 02:32:35 +00:00
BPF [bpf] rename triple names bpf_be -> bpfeb 2015-06-05 16:11:14 +00:00
CPP [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
Generic Move the personality function from LandingPadInst to Function 2015-06-17 20:52:32 +00:00
Hexagon [Hexagon] Printing packet brackets when asm printing and adding a number of tests that test packet brackets. 2015-06-18 20:43:50 +00:00
Inputs IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
Mips Fix "the the" in comments. 2015-06-19 01:53:21 +00:00
MIR MIR Serialization: Introduce a lexer for machine instructions. 2015-06-22 20:37:46 +00:00
MSP430
NVPTX Add NVPTXLowerAlloca pass to convert alloca'ed memory to local address 2015-06-17 22:31:02 +00:00
PowerPC Improve the --expand-relocs handling of MachO. 2015-06-18 22:38:20 +00:00
SPARC Bring r240130 back. 2015-06-22 17:52:52 +00:00
SystemZ [DAGCombiner] Account for getVectorIdxTy() when narrowing vector load 2015-05-05 19:34:10 +00:00
Thumb Move the personality function from LandingPadInst to Function 2015-06-17 20:52:32 +00:00
Thumb2 Move the personality function from LandingPadInst to Function 2015-06-17 20:52:32 +00:00
WinEH Move the personality function from LandingPadInst to Function 2015-06-17 20:52:32 +00:00
X86 [x86] generalize reassociation optimization in machine combiner to 2 instructions 2015-06-23 00:39:40 +00:00
XCore Move the personality function from LandingPadInst to Function 2015-06-17 20:52:32 +00:00