aboutsummaryrefslogtreecommitdiffstats
path: root/tools/opt
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-03-28 18:08:07 +0000
committerChris Lattner <sabre@nondot.org>2002-03-28 18:08:07 +0000
commit328207c3ff5c27d94e275a794ac797173172d6d3 (patch)
tree855e63f128666e90ef9b561f7f32ee13004d2b52 /tools/opt
parent25f5009d0613d4ab5d0f6f60f1bb9f9fa643e77b (diff)
downloadexternal_llvm-328207c3ff5c27d94e275a794ac797173172d6d3.zip
external_llvm-328207c3ff5c27d94e275a794ac797173172d6d3.tar.gz
external_llvm-328207c3ff5c27d94e275a794ac797173172d6d3.tar.bz2
Add hook for pool allocation pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2013 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/opt')
-rw-r--r--tools/opt/opt.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/opt/opt.cpp b/tools/opt/opt.cpp
index 80fad86..9b2a19a 100644
--- a/tools/opt/opt.cpp
+++ b/tools/opt/opt.cpp
@@ -21,6 +21,7 @@
#include "llvm/Transforms/ChangeAllocations.h"
#include "llvm/Transforms/IPO/SimpleStructMutation.h"
#include "llvm/Transforms/IPO/GlobalDCE.h"
+#include "llvm/Transforms/IPO/PoolAllocate.h"
#include "llvm/Transforms/Scalar/DCE.h"
#include "llvm/Transforms/Scalar/ConstantProp.h"
#include "llvm/Transforms/Scalar/IndVarSimplify.h"
@@ -51,7 +52,7 @@ enum Opts {
trace, tracem, paths,
// Interprocedural optimizations...
- globaldce, swapstructs, sortstructs,
+ globaldce, swapstructs, sortstructs, poolalloc,
};
static Pass *createPrintMethodPass() {
@@ -79,6 +80,7 @@ struct {
{ adce , createAgressiveDCEPass },
{ raise , createRaisePointerReferencesPass },
{ mem2reg , createPromoteMemoryToRegister },
+ { lowerrefs, createDecomposeMultiDimRefsPass },
{ trace , createTraceValuesPassForBasicBlocks },
{ tracem , createTraceValuesPassForMethod },
@@ -92,7 +94,7 @@ struct {
{ globaldce , createGlobalDCEPass },
{ swapstructs, createSwapElementsPass },
{ sortstructs, createSortElementsPass },
- { lowerrefs, createDecomposeMultiDimRefsPass }
+ { poolalloc , createPoolAllocatePass },
};
// Command line option handling code...
@@ -122,6 +124,7 @@ cl::EnumList<enum Opts> OptimizationList(cl::NoFlags,
clEnumVal(globaldce , "Remove unreachable globals"),
clEnumVal(swapstructs, "Swap structure types around"),
clEnumVal(sortstructs, "Sort structure elements"),
+ clEnumVal(poolalloc , "Pool allocate disjoint datastructures"),
clEnumVal(raiseallocs, "Raise allocations from calls to instructions"),
clEnumVal(cleangcc , "Cleanup GCC Output"),