mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-13 14:46:53 +00:00
Fix a bug where we would not promote calls to invokes if they occured in
the same block as the setjmp. Thanks to Greg Pettyjohn for noticing this! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21403 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
3468e57f64
commit
cb2d1a2dc2
@ -238,8 +238,7 @@ bool LowerSetJmp::doInitialization(Module& M)
|
||||
// "llvm.{setjmp,longjmp}" functions and none of the setjmp/longjmp error
|
||||
// handling functions (beginning with __llvm_sjljeh_...they don't throw
|
||||
// exceptions).
|
||||
bool LowerSetJmp::IsTransformableFunction(const std::string& Name)
|
||||
{
|
||||
bool LowerSetJmp::IsTransformableFunction(const std::string& Name) {
|
||||
std::string SJLJEh("__llvm_sjljeh");
|
||||
|
||||
if (Name.size() > SJLJEh.size())
|
||||
@ -407,7 +406,10 @@ void LowerSetJmp::TransformSetJmpCall(CallInst* Inst)
|
||||
BasicBlock* SetJmpContBlock = ABlock->splitBasicBlock(Inst);
|
||||
assert(SetJmpContBlock && "Couldn't split setjmp BB!!");
|
||||
|
||||
SetJmpContBlock->setName("SetJmpContBlock");
|
||||
SetJmpContBlock->setName(ABlock->getName()+"SetJmpCont");
|
||||
|
||||
// Add the SetJmpContBlock to the set of blocks reachable from a setjmp.
|
||||
DFSBlocks.insert(SetJmpContBlock);
|
||||
|
||||
// This PHI node will be in the new block created from the
|
||||
// splitBasicBlock call.
|
||||
|
Loading…
Reference in New Issue
Block a user