aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Transforms')
-rw-r--r--lib/Transforms/IPO/LoopExtractor.cpp5
-rw-r--r--lib/Transforms/Scalar/BasicBlockPlacement.cpp3
-rw-r--r--lib/Transforms/Scalar/PRE.cpp1
3 files changed, 9 insertions, 0 deletions
diff --git a/lib/Transforms/IPO/LoopExtractor.cpp b/lib/Transforms/IPO/LoopExtractor.cpp
index 1bdb5c272a..638820e398 100644
--- a/lib/Transforms/IPO/LoopExtractor.cpp
+++ b/lib/Transforms/IPO/LoopExtractor.cpp
@@ -58,6 +58,11 @@ namespace {
Y("loop-extract-single", "Extract at most one loop into a new function");
} // End anonymous namespace
+// createLoopExtractorPass - This pass extracts all natural loops from the
+// program into a function if it can.
+//
+ModulePass *llvm::createLoopExtractorPass() { return new LoopExtractor(); }
+
bool LoopExtractor::runOnFunction(Function &F) {
LoopInfo &LI = getAnalysis<LoopInfo>();
diff --git a/lib/Transforms/Scalar/BasicBlockPlacement.cpp b/lib/Transforms/Scalar/BasicBlockPlacement.cpp
index cadc620170..ec31bbf87e 100644
--- a/lib/Transforms/Scalar/BasicBlockPlacement.cpp
+++ b/lib/Transforms/Scalar/BasicBlockPlacement.cpp
@@ -31,6 +31,7 @@
#include "llvm/Pass.h"
#include "llvm/Support/CFG.h"
#include "llvm/ADT/Statistic.h"
+#include "llvm/Transforms/Scalar.h"
#include <set>
using namespace llvm;
@@ -71,6 +72,8 @@ namespace {
"Profile Guided Basic Block Placement");
}
+FunctionPass *llvm::createBlockPlacementPass() { return new BlockPlacement(); }
+
bool BlockPlacement::runOnFunction(Function &F) {
PI = &getAnalysis<ProfileInfo>();
diff --git a/lib/Transforms/Scalar/PRE.cpp b/lib/Transforms/Scalar/PRE.cpp
index b8934d213d..b849331ff1 100644
--- a/lib/Transforms/Scalar/PRE.cpp
+++ b/lib/Transforms/Scalar/PRE.cpp
@@ -102,6 +102,7 @@ namespace {
RegisterOpt<PRE> Z("pre", "Partial Redundancy Elimination");
}
+FunctionPass* llvm::createPREPass() { return new PRE(); }
bool PRE::runOnFunction(Function &F) {
VN = &getAnalysis<ValueNumbering>();