[LLVMbugs] Patch that fixes LLVM bug 575
John Mellor-Crummey
johnmc at cs.rice.edu
Sun Jun 12 13:18:46 PDT 2005
Bug 575 was triggered when a function containing a call to setjmp
contains a basic block with more than one function call that must be
translated into an invoke.
When the first call was translated into an invoke, the block was
split. The new block, containing all statements in the old block
AFTER the first call was not considered reachable from the setjmp
since it was not in the set DFSBlocks. The solution is to insert it
into the set so its calls are translated into invokes as well.
A patch is below.
eddie 32% cvs diff -C3 LowerSetJmp.cpp
cvs diff: warning: failed to open /home/johnmc/.cvspass for reading:
No such file or directory
Index: LowerSetJmp.cpp
===================================================================
RCS file: /var/cvs/llvm/llvm/lib/Transforms/IPO/LowerSetJmp.cpp,v
retrieving revision 1.25
diff -C3 -r1.25 LowerSetJmp.cpp
*** LowerSetJmp.cpp 5 May 2005 15:47:43 -0000 1.25
--- LowerSetJmp.cpp 12 Jun 2005 20:05:40 -0000
***************
*** 460,465 ****
--- 460,466 ----
BasicBlock* NewBB = OldBB->splitBasicBlock(CI);
assert(NewBB && "Couldn't split BB of \"call\" instruction!!");
NewBB->setName("Call2Invoke");
+ DFSBlocks.insert(NewBB);
Function* Func = OldBB->getParent();
eddie 33%
More information about the llvm-bugs
mailing list