diff options
author | Chris Lattner <sabre@nondot.org> | 2002-05-10 15:43:07 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-05-10 15:43:07 +0000 |
commit | e04f4b60c6458ce63aac2b7b7ac81da267846426 (patch) | |
tree | c75193efe2ec6c793276c6ff891fa34b83994903 | |
parent | 3dec1f272219ee1f8e1499929cdf53f5bc3c2272 (diff) |
Expose the lowerallocs pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2602 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | tools/opt/opt.cpp | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/tools/opt/opt.cpp b/tools/opt/opt.cpp index ebddd18c80..6de7529ec4 100644 --- a/tools/opt/opt.cpp +++ b/tools/opt/opt.cpp @@ -25,18 +25,23 @@ #include "llvm/Transforms/Utils/UnifyFunctionExitNodes.h" #include "llvm/Transforms/Instrumentation/TraceValues.h" #include "llvm/Transforms/Instrumentation/ProfilePaths.h" +#include "llvm/Target/TargetData.h" #include "Support/CommandLine.h" #include "Support/Signals.h" #include <fstream> #include <memory> +// FIXME: This should be parameterizable eventually for different target +// types... +static TargetData TD("opt target"); + // Opts enum - All of the transformations we can do... enum Opts { // Basic optimizations dce, die, constprop, gcse, inlining, constmerge, strip, mstrip, mergereturn, // Miscellaneous Transformations - raiseallocs, funcresolve, cleangcc, lowerrefs, + raiseallocs, lowerallocs, funcresolve, cleangcc, lowerrefs, // Printing and verifying... print, printm, verify, @@ -59,6 +64,10 @@ static Pass *createPrintModulePass() { return new PrintModulePass(&cerr); } +static Pass *createLowerAllocationsPassNT() { + return createLowerAllocationsPass(TD); +} + // OptTable - Correlate enum Opts to Pass constructors... // struct { @@ -93,9 +102,10 @@ struct { { printm , createPrintModulePass }, { verify , createVerifierPass }, - { raiseallocs, createRaiseAllocationsPass }, - { cleangcc , createCleanupGCCOutputPass }, - { funcresolve, createFunctionResolvingPass }, + { raiseallocs, createRaiseAllocationsPass }, + { lowerallocs, createLowerAllocationsPassNT }, + { cleangcc , createCleanupGCCOutputPass }, + { funcresolve, createFunctionResolvingPass }, { internalize, createInternalizePass }, { globaldce , createGlobalDCEPass }, @@ -139,6 +149,7 @@ cl::EnumList<enum Opts> OptimizationList(cl::NoFlags, clEnumVal(poolalloc , "Pool allocate disjoint datastructures"), clEnumVal(raiseallocs, "Raise allocations from calls to instructions"), + clEnumVal(lowerallocs, "Lower allocations from instructions to calls (TD)"), clEnumVal(cleangcc , "Cleanup GCC Output"), clEnumVal(funcresolve, "Resolve calls to foo(...) to foo(<concrete types>)"), clEnumVal(raise , "Raise to Higher Level"), |