diff options
author | Fiona Glaser <escha@apple.com> | 2017-12-12 19:18:02 +0000 |
---|---|---|
committer | Fiona Glaser <escha@apple.com> | 2017-12-12 19:18:02 +0000 |
commit | b8a330c42ab43879119cd3a305756d28aefe9fe6 (patch) | |
tree | f2d8db094226ed64daa3c2df712fc3d166f9ddbf /llvm/lib/CodeGen/LiveDebugVariables.cpp | |
parent | 1b318b10169924bf1e7f03537c4cdfb81966ba49 (diff) | |
download | llvm-b8a330c42ab43879119cd3a305756d28aefe9fe6.zip llvm-b8a330c42ab43879119cd3a305756d28aefe9fe6.tar.gz llvm-b8a330c42ab43879119cd3a305756d28aefe9fe6.tar.bz2 |
Reassociate: add global reassociation algorithm
This algorithm (explained more in the source code) takes into account
global redundancies by building a "pair map" to find common subexprs.
The primary motivation of this is to handle situations like
foo = (a * b) * c
bar = (a * d) * c
where we currently don't identify that "a * c" is redundant.
Accordingly, it prioritizes the emission of a * c so that CSE
can remove the redundant calculation later.
Does not change the actual reassociation algorithm -- only the
order in which the reassociated operand chain is reconstructed.
Gives ~1.5% floating point math instruction count reduction on
a large offline suite of graphics shaders.
llvm-svn: 320515
Diffstat (limited to 'llvm/lib/CodeGen/LiveDebugVariables.cpp')
0 files changed, 0 insertions, 0 deletions