aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorSilviu Baranga <silviu.baranga@arm.com>2015-10-30 15:02:28 +0000
committerSilviu Baranga <silviu.baranga@arm.com>2015-10-30 15:02:28 +0000
commitf91c80720d4cee559880181a42cd7a2ab1fdce47 (patch)
tree2923c9bee4c0081be871ec8b4527a4b8c3d2d5ba /clang/lib/CodeGen/CodeGenModule.cpp
parentfe1eb306feb55a183b9eaf21882582ec28eed1aa (diff)
downloadllvm-f91c80720d4cee559880181a42cd7a2ab1fdce47.zip
llvm-f91c80720d4cee559880181a42cd7a2ab1fdce47.tar.gz
llvm-f91c80720d4cee559880181a42cd7a2ab1fdce47.tar.bz2
[SCEV] Generalize the SCEV algorithm for creating expressions for PHI nodes
Summary: When forming expressions for phi nodes having an incoming value from outside the loop A and a value coming from the previous iteration B we were forming an AddRec if: - B was an AddRec - the value A was equal to the value for B at iteration -1 (or equal to the value of B shifted by one iteration, at iteration 0) In this case, we were computing the expression to be the expression of B, shifted by one iteration. This changes generalizes the logic above by removing the restriction that B needs to be an AddRec. For this we introduce two expression rewriters that allow us to - shift an expression by one iteration - get the value of an expression at iteration 0 This allows us to get SCEV expressions for PHI nodes when these expressions are not AddRecExprs. Reviewers: sanjoy Subscribers: llvm-commits, sanjoy Differential Revision: http://reviews.llvm.org/D14175 llvm-svn: 251700
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions