mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-19 04:32:19 +00:00
Add hooks to call the new swap structcontents pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1243 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e764f60710
commit
854acb996e
@ -16,6 +16,7 @@
|
|||||||
#include "llvm/Transforms/ConstantMerge.h"
|
#include "llvm/Transforms/ConstantMerge.h"
|
||||||
#include "llvm/Transforms/CleanupGCCOutput.h"
|
#include "llvm/Transforms/CleanupGCCOutput.h"
|
||||||
#include "llvm/Transforms/LevelChange.h"
|
#include "llvm/Transforms/LevelChange.h"
|
||||||
|
#include "llvm/Transforms/SwapStructContents.h"
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
|
||||||
using namespace opt;
|
using namespace opt;
|
||||||
@ -25,7 +26,7 @@ enum Opts {
|
|||||||
dce, constprop, inlining, mergecons, strip, mstrip,
|
dce, constprop, inlining, mergecons, strip, mstrip,
|
||||||
|
|
||||||
// Miscellaneous Transformations
|
// Miscellaneous Transformations
|
||||||
trace, tracem, print, cleangcc,
|
trace, tracem, print, cleangcc, swapstructs,
|
||||||
|
|
||||||
// More powerful optimizations
|
// More powerful optimizations
|
||||||
indvars, sccp, adce, raise,
|
indvars, sccp, adce, raise,
|
||||||
@ -49,6 +50,7 @@ struct {
|
|||||||
{ 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() },
|
{ cleangcc , new CleanupGCCOutput() },
|
||||||
|
{ swapstructs, new SwapStructContents() },
|
||||||
};
|
};
|
||||||
|
|
||||||
cl::String InputFilename ("", "Load <arg> file to optimize", cl::NoFlags, "-");
|
cl::String InputFilename ("", "Load <arg> file to optimize", cl::NoFlags, "-");
|
||||||
@ -66,10 +68,12 @@ 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(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"),
|
||||||
|
clEnumVal(swapstructs, "Swap structure types around"),
|
||||||
clEnumVal(print , "Print working method to stderr"),
|
clEnumVal(print , "Print working method to stderr"),
|
||||||
0);
|
0);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user