mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-21 02:24:22 +00:00
Add support for invoke to the MemoryBuiltin analysid.
Update comments accordingly. Make instcombine remove useless invokes to C++'s 'new' allocation function (test attached). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158937 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -1167,6 +1167,10 @@ Instruction *InstCombiner::visitMalloc(Instruction &MI) {
|
||||
}
|
||||
EraseInstFromFunction(*I);
|
||||
}
|
||||
|
||||
if (InvokeInst *II = dyn_cast<InvokeInst>(&MI)) {
|
||||
BranchInst::Create(II->getNormalDest(), II->getParent());
|
||||
}
|
||||
return EraseInstFromFunction(MI);
|
||||
}
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user