mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-25 00:24:26 +00:00
Enable register promotion pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1740 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -24,6 +24,7 @@
|
|||||||
#include "llvm/Transforms/Scalar/ConstantProp.h"
|
#include "llvm/Transforms/Scalar/ConstantProp.h"
|
||||||
#include "llvm/Transforms/Scalar/IndVarSimplify.h"
|
#include "llvm/Transforms/Scalar/IndVarSimplify.h"
|
||||||
#include "llvm/Transforms/Scalar/InstructionCombining.h"
|
#include "llvm/Transforms/Scalar/InstructionCombining.h"
|
||||||
|
#include "llvm/Transforms/Scalar/PromoteMemoryToRegister.h"
|
||||||
#include "llvm/Transforms/Instrumentation/TraceValues.h"
|
#include "llvm/Transforms/Instrumentation/TraceValues.h"
|
||||||
#include "Support/CommandLine.h"
|
#include "Support/CommandLine.h"
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
@ -38,7 +39,7 @@ enum Opts {
|
|||||||
trace, tracem, print, raiseallocs, cleangcc,
|
trace, tracem, print, raiseallocs, cleangcc,
|
||||||
|
|
||||||
// More powerful optimizations
|
// More powerful optimizations
|
||||||
indvars, instcombine, sccp, adce, raise,
|
indvars, instcombine, sccp, adce, raise, mem2reg,
|
||||||
|
|
||||||
// Interprocedural optimizations...
|
// Interprocedural optimizations...
|
||||||
globaldce, swapstructs, sortstructs,
|
globaldce, swapstructs, sortstructs,
|
||||||
@ -87,6 +88,8 @@ struct {
|
|||||||
{ sccp , New<SCCPPass> },
|
{ sccp , New<SCCPPass> },
|
||||||
{ adce , New<AgressiveDCE> },
|
{ adce , New<AgressiveDCE> },
|
||||||
{ raise , New<RaisePointerReferences> },
|
{ raise , New<RaisePointerReferences> },
|
||||||
|
{ mem2reg , newPromoteMemoryToRegister },
|
||||||
|
|
||||||
{ trace , New<InsertTraceCode, bool, true, bool, true> },
|
{ trace , New<InsertTraceCode, bool, true, bool, true> },
|
||||||
{ tracem , New<InsertTraceCode, bool, false, bool, true> },
|
{ tracem , New<InsertTraceCode, bool, false, bool, true> },
|
||||||
{ print , NewPrintMethodPass },
|
{ print , NewPrintMethodPass },
|
||||||
@ -120,6 +123,7 @@ cl::EnumList<enum Opts> OptimizationList(cl::NoFlags,
|
|||||||
clEnumVal(instcombine, "Combine redundant instructions"),
|
clEnumVal(instcombine, "Combine redundant instructions"),
|
||||||
clEnumVal(sccp , "Sparse Conditional Constant Propogation"),
|
clEnumVal(sccp , "Sparse Conditional Constant Propogation"),
|
||||||
clEnumVal(adce , "Agressive DCE"),
|
clEnumVal(adce , "Agressive DCE"),
|
||||||
|
clEnumVal(mem2reg , "Promote alloca locations to registers"),
|
||||||
|
|
||||||
clEnumVal(globaldce , "Remove unreachable globals"),
|
clEnumVal(globaldce , "Remove unreachable globals"),
|
||||||
clEnumVal(swapstructs, "Swap structure types around"),
|
clEnumVal(swapstructs, "Swap structure types around"),
|
||||||
|
Reference in New Issue
Block a user