summaryrefslogtreecommitdiff
path: root/include/llvm/Analysis/ScalarEvolutionExpander.h
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-05-24 18:06:31 +0000
committerDan Gohman <gohman@apple.com>2009-05-24 18:06:31 +0000
commit453aa4fbf1083cc7f646a0ac21e2bcc384a91ae9 (patch)
treeaff2e6588c8b2da406dbb8be182a0a2fb8044a59 /include/llvm/Analysis/ScalarEvolutionExpander.h
parent3925043af0ecf1f0a6158c5007c1186797a252cb (diff)
downloadllvm-453aa4fbf1083cc7f646a0ac21e2bcc384a91ae9.tar.gz
llvm-453aa4fbf1083cc7f646a0ac21e2bcc384a91ae9.tar.bz2
llvm-453aa4fbf1083cc7f646a0ac21e2bcc384a91ae9.tar.xz
Generalize SCEVExpander::visitAddRecExpr's GEP persuit, and avoid
sending SCEVUnknowns to expandAddToGEP. This avoids the need for expandAddToGEP to bend the rules and peek into SCEVUnknown expressions. Factor out the code for testing whether a SCEV can be factored by a constant for use in a GEP index. This allows it to handle SCEVAddRecExprs, by recursing. As a result, SCEVExpander can now put more things in GEP indices, so it emits fewer explicit mul instructions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72366 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Analysis/ScalarEvolutionExpander.h')
-rw-r--r--include/llvm/Analysis/ScalarEvolutionExpander.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/llvm/Analysis/ScalarEvolutionExpander.h b/include/llvm/Analysis/ScalarEvolutionExpander.h
index 8194555cde..7e0de47dc4 100644
--- a/include/llvm/Analysis/ScalarEvolutionExpander.h
+++ b/include/llvm/Analysis/ScalarEvolutionExpander.h
@@ -110,8 +110,8 @@ namespace llvm {
private:
/// expandAddToGEP - Expand a SCEVAddExpr with a pointer type into a GEP
/// instead of using ptrtoint+arithmetic+inttoptr.
- Value *expandAddToGEP(const SCEVAddExpr *S, const PointerType *PTy,
- const Type *Ty, Value *V);
+ Value *expandAddToGEP(const SCEVHandle *op_begin, const SCEVHandle *op_end,
+ const PointerType *PTy, const Type *Ty, Value *V);
Value *expand(const SCEV *S);