Skip to content
Snippets Groups Projects
Commit a3159af7 authored by Chris Lattner's avatar Chris Lattner
Browse files

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
parent ce7ce162
No related branches found
No related tags found
No related merge requests found
...@@ -238,8 +238,7 @@ bool LowerSetJmp::doInitialization(Module& M) ...@@ -238,8 +238,7 @@ bool LowerSetJmp::doInitialization(Module& M)
// "llvm.{setjmp,longjmp}" functions and none of the setjmp/longjmp error // "llvm.{setjmp,longjmp}" functions and none of the setjmp/longjmp error
// handling functions (beginning with __llvm_sjljeh_...they don't throw // handling functions (beginning with __llvm_sjljeh_...they don't throw
// exceptions). // exceptions).
bool LowerSetJmp::IsTransformableFunction(const std::string& Name) bool LowerSetJmp::IsTransformableFunction(const std::string& Name) {
{
std::string SJLJEh("__llvm_sjljeh"); std::string SJLJEh("__llvm_sjljeh");
if (Name.size() > SJLJEh.size()) if (Name.size() > SJLJEh.size())
...@@ -407,7 +406,10 @@ void LowerSetJmp::TransformSetJmpCall(CallInst* Inst) ...@@ -407,7 +406,10 @@ void LowerSetJmp::TransformSetJmpCall(CallInst* Inst)
BasicBlock* SetJmpContBlock = ABlock->splitBasicBlock(Inst); BasicBlock* SetJmpContBlock = ABlock->splitBasicBlock(Inst);
assert(SetJmpContBlock && "Couldn't split setjmp BB!!"); 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 // This PHI node will be in the new block created from the
// splitBasicBlock call. // splitBasicBlock call.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment