mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-03-04 21:31:03 +00:00
Add hook for pool allocation pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2013 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
25f5009d06
commit
328207c3ff
@ -21,6 +21,7 @@
|
|||||||
#include "llvm/Transforms/ChangeAllocations.h"
|
#include "llvm/Transforms/ChangeAllocations.h"
|
||||||
#include "llvm/Transforms/IPO/SimpleStructMutation.h"
|
#include "llvm/Transforms/IPO/SimpleStructMutation.h"
|
||||||
#include "llvm/Transforms/IPO/GlobalDCE.h"
|
#include "llvm/Transforms/IPO/GlobalDCE.h"
|
||||||
|
#include "llvm/Transforms/IPO/PoolAllocate.h"
|
||||||
#include "llvm/Transforms/Scalar/DCE.h"
|
#include "llvm/Transforms/Scalar/DCE.h"
|
||||||
#include "llvm/Transforms/Scalar/ConstantProp.h"
|
#include "llvm/Transforms/Scalar/ConstantProp.h"
|
||||||
#include "llvm/Transforms/Scalar/IndVarSimplify.h"
|
#include "llvm/Transforms/Scalar/IndVarSimplify.h"
|
||||||
@ -51,7 +52,7 @@ enum Opts {
|
|||||||
trace, tracem, paths,
|
trace, tracem, paths,
|
||||||
|
|
||||||
// Interprocedural optimizations...
|
// Interprocedural optimizations...
|
||||||
globaldce, swapstructs, sortstructs,
|
globaldce, swapstructs, sortstructs, poolalloc,
|
||||||
};
|
};
|
||||||
|
|
||||||
static Pass *createPrintMethodPass() {
|
static Pass *createPrintMethodPass() {
|
||||||
@ -79,6 +80,7 @@ struct {
|
|||||||
{ adce , createAgressiveDCEPass },
|
{ adce , createAgressiveDCEPass },
|
||||||
{ raise , createRaisePointerReferencesPass },
|
{ raise , createRaisePointerReferencesPass },
|
||||||
{ mem2reg , createPromoteMemoryToRegister },
|
{ mem2reg , createPromoteMemoryToRegister },
|
||||||
|
{ lowerrefs, createDecomposeMultiDimRefsPass },
|
||||||
|
|
||||||
{ trace , createTraceValuesPassForBasicBlocks },
|
{ trace , createTraceValuesPassForBasicBlocks },
|
||||||
{ tracem , createTraceValuesPassForMethod },
|
{ tracem , createTraceValuesPassForMethod },
|
||||||
@ -92,7 +94,7 @@ struct {
|
|||||||
{ globaldce , createGlobalDCEPass },
|
{ globaldce , createGlobalDCEPass },
|
||||||
{ swapstructs, createSwapElementsPass },
|
{ swapstructs, createSwapElementsPass },
|
||||||
{ sortstructs, createSortElementsPass },
|
{ sortstructs, createSortElementsPass },
|
||||||
{ lowerrefs, createDecomposeMultiDimRefsPass }
|
{ poolalloc , createPoolAllocatePass },
|
||||||
};
|
};
|
||||||
|
|
||||||
// Command line option handling code...
|
// Command line option handling code...
|
||||||
@ -122,6 +124,7 @@ cl::EnumList<enum Opts> OptimizationList(cl::NoFlags,
|
|||||||
clEnumVal(globaldce , "Remove unreachable globals"),
|
clEnumVal(globaldce , "Remove unreachable globals"),
|
||||||
clEnumVal(swapstructs, "Swap structure types around"),
|
clEnumVal(swapstructs, "Swap structure types around"),
|
||||||
clEnumVal(sortstructs, "Sort structure elements"),
|
clEnumVal(sortstructs, "Sort structure elements"),
|
||||||
|
clEnumVal(poolalloc , "Pool allocate disjoint datastructures"),
|
||||||
|
|
||||||
clEnumVal(raiseallocs, "Raise allocations from calls to instructions"),
|
clEnumVal(raiseallocs, "Raise allocations from calls to instructions"),
|
||||||
clEnumVal(cleangcc , "Cleanup GCC Output"),
|
clEnumVal(cleangcc , "Cleanup GCC Output"),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user