[llvm-commits] CVS: llvm/lib/Transforms/Utils/CodeExtractor.cpp

Misha Brukman brukman at cs.uiuc.edu
Mon Mar 1 18:34:37 PST 2004


Changes in directory llvm/lib/Transforms/Utils:

CodeExtractor.cpp updated: 1.2 -> 1.3

---
Log message:

Implement ExtractCodeRegion()


---
Diffs of the changes:  (+9 -1)

Index: llvm/lib/Transforms/Utils/CodeExtractor.cpp
diff -u llvm/lib/Transforms/Utils/CodeExtractor.cpp:1.2 llvm/lib/Transforms/Utils/CodeExtractor.cpp:1.3
--- llvm/lib/Transforms/Utils/CodeExtractor.cpp:1.2	Mon Mar  1 12:28:34 2004
+++ llvm/lib/Transforms/Utils/CodeExtractor.cpp	Mon Mar  1 18:20:57 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





More information about the llvm-commits mailing list