mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-15 22:28:18 +00:00
Expose more xforms to the opt utility
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@900 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
LEVEL = ../..
|
LEVEL = ../..
|
||||||
TOOLNAME = opt
|
TOOLNAME = opt
|
||||||
USEDLIBS = opt bcreader bcwriter asmwriter analysis vmcore support instrument
|
USEDLIBS = opt bcreader bcwriter asmwriter analysis vmcore support instrument transforms
|
||||||
|
|
||||||
include $(LEVEL)/Makefile.common
|
include $(LEVEL)/Makefile.common
|
||||||
|
|
||||||
|
@@ -13,13 +13,14 @@
|
|||||||
#include "llvm/Optimizations/AllOpts.h"
|
#include "llvm/Optimizations/AllOpts.h"
|
||||||
#include "llvm/Transforms/Instrumentation/TraceValues.h"
|
#include "llvm/Transforms/Instrumentation/TraceValues.h"
|
||||||
#include "llvm/Transforms/PrintModulePass.h"
|
#include "llvm/Transforms/PrintModulePass.h"
|
||||||
|
#include "llvm/Transforms/ConstantMerge.h"
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
|
||||||
using namespace opt;
|
using namespace opt;
|
||||||
|
|
||||||
enum Opts {
|
enum Opts {
|
||||||
// Basic optimizations
|
// Basic optimizations
|
||||||
dce, constprop, inlining, strip, mstrip,
|
dce, constprop, inlining, mergecons, strip, mstrip,
|
||||||
|
|
||||||
// Miscellaneous Transformations
|
// Miscellaneous Transformations
|
||||||
trace, tracem, print,
|
trace, tracem, print,
|
||||||
@@ -35,6 +36,7 @@ struct {
|
|||||||
{ dce , new opt::DeadCodeElimination() },
|
{ dce , new opt::DeadCodeElimination() },
|
||||||
{ constprop, new opt::ConstantPropogation() },
|
{ constprop, new opt::ConstantPropogation() },
|
||||||
{ inlining , new opt::MethodInlining() },
|
{ inlining , new opt::MethodInlining() },
|
||||||
|
{ mergecons, new ConstantMerge() },
|
||||||
{ strip , new opt::SymbolStripping() },
|
{ strip , new opt::SymbolStripping() },
|
||||||
{ mstrip , new opt::FullSymbolStripping() },
|
{ mstrip , new opt::FullSymbolStripping() },
|
||||||
{ indvars , new opt::InductionVariableCannonicalize() },
|
{ indvars , new opt::InductionVariableCannonicalize() },
|
||||||
@@ -55,6 +57,7 @@ cl::EnumList<enum Opts> OptimizationList(cl::NoFlags,
|
|||||||
clEnumVal(dce , "Dead Code Elimination"),
|
clEnumVal(dce , "Dead Code Elimination"),
|
||||||
clEnumVal(constprop, "Simple Constant Propogation"),
|
clEnumVal(constprop, "Simple Constant Propogation"),
|
||||||
clEnumValN(inlining , "inline", "Method Integration"),
|
clEnumValN(inlining , "inline", "Method Integration"),
|
||||||
|
clEnumVal(mergecons, "Merge identical global constants"),
|
||||||
clEnumVal(strip , "Strip Symbols"),
|
clEnumVal(strip , "Strip Symbols"),
|
||||||
clEnumVal(mstrip , "Strip Module Symbols"),
|
clEnumVal(mstrip , "Strip Module Symbols"),
|
||||||
clEnumVal(indvars , "Simplify Induction Variables"),
|
clEnumVal(indvars , "Simplify Induction Variables"),
|
||||||
|
Reference in New Issue
Block a user