[llvm-commits] CVS: llvm/lib/Transforms/IPO/LowerSetJmp.cpp
Chris Lattner
lattner at cs.uiuc.edu
Thu Apr 21 09:47:02 PDT 2005
Changes in directory llvm/lib/Transforms/IPO:
LowerSetJmp.cpp updated: 1.22 -> 1.23
---
Log message:
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!
---
Diffs of the changes: (+5 -3)
LowerSetJmp.cpp | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
Index: llvm/lib/Transforms/IPO/LowerSetJmp.cpp
diff -u llvm/lib/Transforms/IPO/LowerSetJmp.cpp:1.22 llvm/lib/Transforms/IPO/LowerSetJmp.cpp:1.23
--- llvm/lib/Transforms/IPO/LowerSetJmp.cpp:1.22 Fri Jan 28 18:38:45 2005
+++ llvm/lib/Transforms/IPO/LowerSetJmp.cpp Thu Apr 21 11:46:46 2005
@@ -238,8 +238,7 @@
// "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 @@
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.
More information about the llvm-commits
mailing list