mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-21 18:24:23 +00:00
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
This commit is contained in:
@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user