diff options
| author | Chris Lattner <sabre@nondot.org> | 2005-04-21 16:46:46 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2005-04-21 16:46:46 +0000 |
| commit | a3159af7038984e753488d6e8fe5a174dd2503ba (patch) | |
| tree | 806263e1402f366207f51a97986292f1ca29464d /llvm/lib | |
| parent | ce7ce1628f41f61c27a12bc1235d7da3063909d1 (diff) | |
| download | bcm5719-llvm-a3159af7038984e753488d6e8fe5a174dd2503ba.tar.gz bcm5719-llvm-a3159af7038984e753488d6e8fe5a174dd2503ba.zip | |
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!
llvm-svn: 21403
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Transforms/IPO/LowerSetJmp.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/IPO/LowerSetJmp.cpp b/llvm/lib/Transforms/IPO/LowerSetJmp.cpp index 2ba8a756d84..38828d9dccd 100644 --- a/llvm/lib/Transforms/IPO/LowerSetJmp.cpp +++ b/llvm/lib/Transforms/IPO/LowerSetJmp.cpp @@ -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. |

