mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-06 04:31:08 +00:00
cleanup/simplify
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80706 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
2af658fcc0
commit
7c8c1ba40c
@ -331,9 +331,8 @@ CallGraphNode *SRETPromotion::updateCallSites(Function *F, Function *NF) {
|
|||||||
if (C2 && (C2 == Call))
|
if (C2 && (C2 == Call))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (GetElementPtrInst *UGEP = dyn_cast<GetElementPtrInst>(U2)) {
|
GetElementPtrInst *UGEP = cast<GetElementPtrInst>(U2);
|
||||||
ConstantInt *Idx = dyn_cast<ConstantInt>(UGEP->getOperand(2));
|
ConstantInt *Idx = cast<ConstantInt>(UGEP->getOperand(2));
|
||||||
assert (Idx && "Unexpected getelementptr index!");
|
|
||||||
Value *GR = ExtractValueInst::Create(New, Idx->getZExtValue(),
|
Value *GR = ExtractValueInst::Create(New, Idx->getZExtValue(),
|
||||||
"evi", UGEP);
|
"evi", UGEP);
|
||||||
while(!UGEP->use_empty()) {
|
while(!UGEP->use_empty()) {
|
||||||
@ -346,9 +345,6 @@ CallGraphNode *SRETPromotion::updateCallSites(Function *F, Function *NF) {
|
|||||||
UGEP->eraseFromParent();
|
UGEP->eraseFromParent();
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
assert(0 && "Unexpected sret parameter use");
|
|
||||||
}
|
|
||||||
Call->eraseFromParent();
|
Call->eraseFromParent();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user