mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-01 01:43:57 +00:00
Shorten some expressions by using ArrayRef::slice().
llvm-svn: 135910
This commit is contained in:
parent
920738256c
commit
775ac35cf1
@ -407,8 +407,7 @@ InsertPHITranslatedSubExpr(Value *InVal, BasicBlock *CurBB,
|
||||
}
|
||||
|
||||
GetElementPtrInst *Result =
|
||||
GetElementPtrInst::Create(GEPOps[0],
|
||||
makeArrayRef(GEPOps.begin() + 1, GEPOps.end()),
|
||||
GetElementPtrInst::Create(GEPOps[0], makeArrayRef(GEPOps).slice(1),
|
||||
InVal->getName()+".phi.trans.insert",
|
||||
PredBB->getTerminator());
|
||||
Result->setIsInBounds(GEP->isInBounds());
|
||||
|
@ -229,8 +229,7 @@ Instruction *InstCombiner::FoldPHIArgGEPIntoPHI(PHINode &PN) {
|
||||
|
||||
Value *Base = FixedOperands[0];
|
||||
GetElementPtrInst *NewGEP =
|
||||
GetElementPtrInst::Create(Base, makeArrayRef(FixedOperands.begin() + 1,
|
||||
FixedOperands.end()));
|
||||
GetElementPtrInst::Create(Base, makeArrayRef(FixedOperands).slice(1));
|
||||
if (AllInBounds) NewGEP->setIsInBounds();
|
||||
NewGEP->setDebugLoc(FirstInst->getDebugLoc());
|
||||
return NewGEP;
|
||||
|
Loading…
x
Reference in New Issue
Block a user