[llvm-commits] [parallel] CVS: llvm/lib/Transforms/Utils/CodeExtractor.cpp LoopExtractor.cpp
Misha Brukman
brukman at cs.uiuc.edu
Wed Mar 10 19:44:01 PST 2004
Changes in directory llvm/lib/Transforms/Utils:
CodeExtractor.cpp updated: 1.2.2.1 -> 1.2.2.2
LoopExtractor.cpp updated: 1.2.2.1 -> 1.2.2.2
---
Log message:
Merge from trunk.
---
Diffs of the changes: (+11 -4)
Index: llvm/lib/Transforms/Utils/CodeExtractor.cpp
diff -u llvm/lib/Transforms/Utils/CodeExtractor.cpp:1.2.2.1 llvm/lib/Transforms/Utils/CodeExtractor.cpp:1.2.2.2
--- llvm/lib/Transforms/Utils/CodeExtractor.cpp:1.2.2.1 Mon Mar 1 17:58:16 2004
+++ llvm/lib/Transforms/Utils/CodeExtractor.cpp Wed Mar 10 19:42:55 2004
@@ -443,7 +443,7 @@
brInst);
}
- // Rewrite branches into exists which return a value based on which
+ // Rewrite branches into exits which return a value based on which
// exit we take from this function
if (brInst->isUnconditional()) {
if (!contains(code, brInst->getSuccessor(0))) {
@@ -564,6 +564,14 @@
moveCodeToFunction(code, newFunction);
return newFunction;
+}
+
+/// ExtractCodeRegion - slurp a sequence of basic blocks into a brand new
+/// function
+///
+Function* llvm::ExtractCodeRegion(const std::vector<BasicBlock*> &code) {
+ CodeExtractor CE;
+ return CE.ExtractCodeRegion(code);
}
/// ExtractBasicBlock - slurp a natural loop into a brand new function
Index: llvm/lib/Transforms/Utils/LoopExtractor.cpp
diff -u llvm/lib/Transforms/Utils/LoopExtractor.cpp:1.2.2.1 llvm/lib/Transforms/Utils/LoopExtractor.cpp:1.2.2.2
--- llvm/lib/Transforms/Utils/LoopExtractor.cpp:1.2.2.1 Mon Mar 1 17:58:16 2004
+++ llvm/lib/Transforms/Utils/LoopExtractor.cpp Wed Mar 10 19:42:55 2004
@@ -2,7 +2,8 @@
//
// A pass wrapper around the ExtractLoop() scalar transformation to extract each
// top-level loop into its own new function. If the loop is the ONLY loop in a
-// given function, it is not touched.
+// given function, it is not touched. This is a pass most useful for debugging
+// via bugpoint.
//
//===----------------------------------------------------------------------===//
@@ -57,8 +58,6 @@
return Changed;
}
-
-
} // End anonymous namespace
More information about the llvm-commits
mailing list