mirror of
https://github.com/RPCSX/llvm.git
synced 2025-02-09 22:13:07 +00:00
Add hook for GCC cleanup pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1060 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f83bcfcd00
commit
e166fe1910
@ -14,6 +14,7 @@
|
|||||||
#include "llvm/Transforms/Instrumentation/TraceValues.h"
|
#include "llvm/Transforms/Instrumentation/TraceValues.h"
|
||||||
#include "llvm/Assembly/PrintModulePass.h"
|
#include "llvm/Assembly/PrintModulePass.h"
|
||||||
#include "llvm/Transforms/ConstantMerge.h"
|
#include "llvm/Transforms/ConstantMerge.h"
|
||||||
|
#include "llvm/Transforms/CleanupGCCOutput.h"
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
|
||||||
using namespace opt;
|
using namespace opt;
|
||||||
@ -23,7 +24,7 @@ enum Opts {
|
|||||||
dce, constprop, inlining, mergecons, strip, mstrip,
|
dce, constprop, inlining, mergecons, strip, mstrip,
|
||||||
|
|
||||||
// Miscellaneous Transformations
|
// Miscellaneous Transformations
|
||||||
trace, tracem, print,
|
trace, tracem, print, cleangcc,
|
||||||
|
|
||||||
// More powerful optimizations
|
// More powerful optimizations
|
||||||
indvars, sccp, adce, raise,
|
indvars, sccp, adce, raise,
|
||||||
@ -46,6 +47,7 @@ struct {
|
|||||||
{ trace , new InsertTraceCode(true, true) },
|
{ trace , new InsertTraceCode(true, true) },
|
||||||
{ tracem , new InsertTraceCode(false, true) },
|
{ tracem , new InsertTraceCode(false, true) },
|
||||||
{ print , new PrintModulePass("Current Method: \n",&cerr) },
|
{ print , new PrintModulePass("Current Method: \n",&cerr) },
|
||||||
|
{ cleangcc , new CleanupGCCOutput() },
|
||||||
};
|
};
|
||||||
|
|
||||||
cl::String InputFilename ("", "Load <arg> file to optimize", cl::NoFlags, "-");
|
cl::String InputFilename ("", "Load <arg> file to optimize", cl::NoFlags, "-");
|
||||||
@ -63,6 +65,7 @@ cl::EnumList<enum Opts> OptimizationList(cl::NoFlags,
|
|||||||
clEnumVal(indvars , "Simplify Induction Variables"),
|
clEnumVal(indvars , "Simplify Induction Variables"),
|
||||||
clEnumVal(sccp , "Sparse Conditional Constant Propogation"),
|
clEnumVal(sccp , "Sparse Conditional Constant Propogation"),
|
||||||
clEnumVal(adce , "Agressive DCE"),
|
clEnumVal(adce , "Agressive DCE"),
|
||||||
|
clEnumVal(cleangcc , "Cleanup GCC Output"),
|
||||||
clEnumVal(raise , "Raise to Higher Level"),
|
clEnumVal(raise , "Raise to Higher Level"),
|
||||||
clEnumVal(trace , "Insert BB & Method trace code"),
|
clEnumVal(trace , "Insert BB & Method trace code"),
|
||||||
clEnumVal(tracem , "Insert Method trace code only"),
|
clEnumVal(tracem , "Insert Method trace code only"),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user