1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-26 06:22:56 +02:00
llvm-mirror/test
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
..
Analysis [X86][SSE][CostModel] Added full set of sitofp/uitofp costings for SSE2/AVX/AVX2/AVX512F. 2015-06-20 14:58:01 +00:00
Assembler Move the personality function from LandingPadInst to Function 2015-06-17 20:52:32 +00:00
Bindings
Bitcode Move the personality function from LandingPadInst to Function 2015-06-17 20:52:32 +00:00
BugPoint
CodeGen [x86] generalize reassociation optimization in machine combiner to 2 instructions 2015-06-23 00:39:40 +00:00
DebugInfo AsmPrinter: Don't emit empty .debug_loc entries 2015-06-21 16:54:56 +00:00
ExecutionEngine Move the personality function from LandingPadInst to Function 2015-06-17 20:52:32 +00:00
Feature Move the personality function from LandingPadInst to Function 2015-06-17 20:52:32 +00:00
FileCheck
Instrumentation Move the personality function from LandingPadInst to Function 2015-06-17 20:52:32 +00:00
Integer
JitListener
LibDriver Use correct escaping for semicolon on Windows. 2015-06-20 01:28:20 +00:00
Linker Linker: Do not expect comdat to exist in source module. 2015-06-22 21:46:51 +00:00
LTO Move the personality function from LandingPadInst to Function 2015-06-17 20:52:32 +00:00
MC Fix PR23914. 2015-06-22 23:36:03 +00:00
Object Improve error handling of getRelocationAddend. 2015-06-19 20:58:43 +00:00
Other Move the personality function from LandingPadInst to Function 2015-06-17 20:52:32 +00:00
SymbolRewriter
TableGen
tools [Object] Search for architecures by name in MachOUniversalBinary::getObjectForArch() 2015-06-22 21:33:24 +00:00
Transforms [LoopDist] Improve variable names and comments in LoopVersioning class, NFC 2015-06-22 22:59:40 +00:00
Unit
Verifier Move the personality function from LandingPadInst to Function 2015-06-17 20:52:32 +00:00
YAMLParser
.clang-format
CMakeLists.txt
lit.cfg
lit.site.cfg.in
Makefile
Makefile.tests
TestRunner.sh