aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-10-26 19:12:14 +0000
committerDan Gohman <gohman@apple.com>2009-10-26 19:12:14 +0000
commit6000e253d4b59677030fdf2f53f8d1e5fa00a1a4 (patch)
tree88b2e31a282858d88066399cbd9c1a278c3063b5 /include
parentc932213e136ebcf7692b803369fd7bbf3c461daa (diff)
Check in the experimental GEP splitter pass. This pass splits complex
GEPs (more than one non-zero index) into simple GEPs (at most one non-zero index). In some simple experiments using this it's not uncommon to see 3% overall code size wins, because it exposes redundancies that can be eliminated, however it's tricky to use because instcombine aggressively undoes the work that this pass does. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85144 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/LinkAllPasses.h1
-rw-r--r--include/llvm/Transforms/Scalar.h6
2 files changed, 7 insertions, 0 deletions
diff --git a/include/llvm/LinkAllPasses.h b/include/llvm/LinkAllPasses.h
index 9335976f33..bc5722e82e 100644
--- a/include/llvm/LinkAllPasses.h
+++ b/include/llvm/LinkAllPasses.h
@@ -141,6 +141,7 @@ namespace {
(void) llvm::createPartialInliningPass();
(void) llvm::createSSIPass();
(void) llvm::createSSIEverythingPass();
+ (void) llvm::createGEPSplitterPass();
(void)new llvm::IntervalPartition();
(void)new llvm::FindUsedTypes();
diff --git a/include/llvm/Transforms/Scalar.h b/include/llvm/Transforms/Scalar.h
index fee4e65938..c5378994fd 100644
--- a/include/llvm/Transforms/Scalar.h
+++ b/include/llvm/Transforms/Scalar.h
@@ -341,6 +341,12 @@ FunctionPass *createSSIPass();
//
FunctionPass *createSSIEverythingPass();
+//===----------------------------------------------------------------------===//
+//
+// GEPSplitter - Split complex GEPs into simple ones
+//
+FunctionPass *createGEPSplitterPass();
+
} // End llvm namespace
#endif