[llvm-commits] CVS: llvm-java/lib/Compiler/Compiler.cpp
Alkis Evlogimenos
alkis at cs.uiuc.edu
Sat Dec 4 17:30:13 PST 2004
Changes in directory llvm-java/lib/Compiler:
Compiler.cpp updated: 1.155 -> 1.156
---
Log message:
Remove empty basic blocks after we compile a function (we get empty
basic blocks because exceptions are not implemented).
---
Diffs of the changes: (+9 -0)
Index: llvm-java/lib/Compiler/Compiler.cpp
diff -u llvm-java/lib/Compiler/Compiler.cpp:1.155 llvm-java/lib/Compiler/Compiler.cpp:1.156
--- llvm-java/lib/Compiler/Compiler.cpp:1.155 Fri Dec 3 20:10:36 2004
+++ llvm-java/lib/Compiler/Compiler.cpp Sat Dec 4 19:30:03 2004
@@ -1289,6 +1289,15 @@
}
}
+ // FIXME: remove empty basic blocks (we have empty basic blocks
+ // because of our lack of exception support).
+ for (Function::iterator bb = function->begin(), be = function->end();
+ bb != be; )
+ if (bb->empty())
+ bb = function->getBasicBlockList().erase(bb);
+ else
+ ++bb;
+
DEBUG(std::cerr << "Finished compilation of method: "
<< classMethodDesc << '\n');
// DEBUG(function->dump());
More information about the llvm-commits
mailing list