1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 12:33:33 +02:00
llvm-mirror/lib/Transforms
Silviu Baranga f6006f41f7 [LV][LAA] Add a layer over SCEV to apply run-time checked knowledge on SCEV expressions
Summary:
This change creates a layer over ScalarEvolution for LAA and LV, and centralizes the
usage of SCEV predicates. The SCEVPredicatedLayer takes the statically deduced knowledge
by ScalarEvolution and applies the knowledge from the SCEV predicates. The end goal is
that both LAA and LV should use this interface everywhere.

This also solves a problem involving the result of SCEV expression rewritting when
the predicate changes. Suppose we have the expression (sext {a,+,b}) and two predicates
  P1: {a,+,b} has nsw
  P2: b = 1.

Applying P1 and then P2 gives us {a,+,1}, while applying P2 and the P1 gives us
sext({a,+,1}) (the AddRec expression was changed by P2 so P1 no longer applies).
The SCEVPredicatedLayer maintains the order of transformations by feeding back
the results of previous transformations into new transformations, and therefore
avoiding this issue.

The SCEVPredicatedLayer maintains a cache to remember the results of previous
SCEV rewritting results. This also has the benefit of reducing the overall number
of expression rewrites.

Reviewers: mzolotukhin, anemet

Subscribers: jmolloy, sanjoy, llvm-commits

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

llvm-svn: 255115
2015-12-09 15:03:52 +00:00
..
Hello Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
InstCombine [InstCombine] Call getCmpPredicateForMinMax only with a valid SPF 2015-12-05 23:44:22 +00:00
Instrumentation [ASAN] Add doFinalization to reset state 2015-12-05 14:42:34 +00:00
IPO The current importing scheme is processing one function at a time, 2015-12-09 08:17:35 +00:00
ObjCARC ObjCARC: Remove implicit ilist iterator conversions, NFC 2015-10-19 23:20:14 +00:00
Scalar [LV][LAA] Add a layer over SCEV to apply run-time checked knowledge on SCEV expressions 2015-12-09 15:03:52 +00:00
Utils [LV][LAA] Add a layer over SCEV to apply run-time checked knowledge on SCEV expressions 2015-12-09 15:03:52 +00:00
Vectorize [LV][LAA] Add a layer over SCEV to apply run-time checked knowledge on SCEV expressions 2015-12-09 15:03:52 +00:00
CMakeLists.txt
LLVMBuild.txt
Makefile