mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-19 04:32:19 +00:00
Minor cleanups
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9067 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
bb2d4de409
commit
6d3906be28
@ -136,9 +136,7 @@ bool LowerSetJmp::run(Module& M)
|
||||
|
||||
for (Value::use_iterator B = SetJmp->use_begin(), E = SetJmp->use_end();
|
||||
B != E; ++B) {
|
||||
Instruction* I = cast<Instruction>(*B);
|
||||
BasicBlock* BB = I->getParent();
|
||||
Function* Func = BB->getParent();
|
||||
BasicBlock* BB = cast<Instruction>(*B)->getParent();
|
||||
DFSBlocks.insert(df_begin(BB), df_end(BB));
|
||||
}
|
||||
|
||||
@ -414,7 +412,6 @@ void LowerSetJmp::visitCallInst(CallInst& CI)
|
||||
CI.getCalledFunction()->isIntrinsic()) return;
|
||||
|
||||
BasicBlock* OldBB = CI.getParent();
|
||||
Function* Func = OldBB->getParent();
|
||||
|
||||
// If not reachable from a setjmp call, don't transform.
|
||||
if (!DFSBlocks.count(OldBB)) return;
|
||||
@ -424,6 +421,7 @@ void LowerSetJmp::visitCallInst(CallInst& CI)
|
||||
NewBB->setName("Call2Invoke");
|
||||
|
||||
// Reposition the split BB in the BB list to make things tidier.
|
||||
Function* Func = OldBB->getParent();
|
||||
Func->getBasicBlockList().remove(NewBB);
|
||||
Func->getBasicBlockList().insert(++Function::iterator(OldBB), NewBB);
|
||||
|
||||
@ -453,7 +451,6 @@ void LowerSetJmp::visitInvokeInst(InvokeInst& II)
|
||||
II.getCalledFunction()->isIntrinsic()) return;
|
||||
|
||||
BasicBlock* BB = II.getParent();
|
||||
Function* Func = BB->getParent();
|
||||
|
||||
// If not reachable from a setjmp call, don't transform.
|
||||
if (!DFSBlocks.count(BB)) return;
|
||||
@ -461,6 +458,7 @@ void LowerSetJmp::visitInvokeInst(InvokeInst& II)
|
||||
BasicBlock* NormalBB = II.getNormalDest();
|
||||
BasicBlock* ExceptBB = II.getExceptionalDest();
|
||||
|
||||
Function* Func = BB->getParent();
|
||||
BasicBlock* NewExceptBB = new BasicBlock("InvokeExcept", Func);
|
||||
BasicBlock::InstListType& InstList = NewExceptBB->getInstList();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user