mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-03-19 19:31:50 +00:00
Shorten some expressions by using ArrayRef::slice().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135910 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ddfb69cd47
commit
2eb40f6d86
@ -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