mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-23 22:23:00 +00:00
Merge the contents from exception-handling-rewrite to the mainline.
This adds the new instructions 'landingpad' and 'resume'. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136253 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -732,9 +732,11 @@ Instruction *InstCombiner::visitCallInst(CallInst &CI) {
|
||||
}
|
||||
}
|
||||
|
||||
// If the stack restore is in a return/unwind block and if there are no
|
||||
// allocas or calls between the restore and the return, nuke the restore.
|
||||
if (!CannotRemove && (isa<ReturnInst>(TI) || isa<UnwindInst>(TI)))
|
||||
// If the stack restore is in a return, resume, or unwind block and if there
|
||||
// are no allocas or calls between the restore and the return, nuke the
|
||||
// restore.
|
||||
if (!CannotRemove && (isa<ReturnInst>(TI) || isa<ResumeInst>(TI) ||
|
||||
isa<UnwindInst>(TI)))
|
||||
return EraseInstFromFunction(CI);
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user