mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-10-06 02:17:20 +00:00
Expose the internalize pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2365 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -20,6 +20,7 @@
|
|||||||
#include "llvm/Transforms/SymbolStripping.h"
|
#include "llvm/Transforms/SymbolStripping.h"
|
||||||
#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/Internalize.h"
|
||||||
#include "llvm/Transforms/IPO/GlobalDCE.h"
|
#include "llvm/Transforms/IPO/GlobalDCE.h"
|
||||||
#include "llvm/Transforms/IPO/PoolAllocate.h"
|
#include "llvm/Transforms/IPO/PoolAllocate.h"
|
||||||
#include "llvm/Transforms/Scalar/DCE.h"
|
#include "llvm/Transforms/Scalar/DCE.h"
|
||||||
@@ -54,7 +55,7 @@ enum Opts {
|
|||||||
trace, tracem, paths,
|
trace, tracem, paths,
|
||||||
|
|
||||||
// Interprocedural optimizations...
|
// Interprocedural optimizations...
|
||||||
globaldce, swapstructs, sortstructs, poolalloc,
|
internalize, globaldce, swapstructs, sortstructs, poolalloc,
|
||||||
};
|
};
|
||||||
|
|
||||||
static Pass *createPrintFunctionPass() {
|
static Pass *createPrintFunctionPass() {
|
||||||
@@ -100,6 +101,8 @@ struct {
|
|||||||
{ raiseallocs, createRaiseAllocationsPass },
|
{ raiseallocs, createRaiseAllocationsPass },
|
||||||
{ cleangcc , createCleanupGCCOutputPass },
|
{ cleangcc , createCleanupGCCOutputPass },
|
||||||
{ funcresolve, createFunctionResolvingPass },
|
{ funcresolve, createFunctionResolvingPass },
|
||||||
|
|
||||||
|
{ internalize, createInternalizePass },
|
||||||
{ globaldce , createGlobalDCEPass },
|
{ globaldce , createGlobalDCEPass },
|
||||||
{ swapstructs, createSwapElementsPass },
|
{ swapstructs, createSwapElementsPass },
|
||||||
{ sortstructs, createSortElementsPass },
|
{ sortstructs, createSortElementsPass },
|
||||||
@@ -132,6 +135,7 @@ cl::EnumList<enum Opts> OptimizationList(cl::NoFlags,
|
|||||||
clEnumVal(adce , "Agressive DCE"),
|
clEnumVal(adce , "Agressive DCE"),
|
||||||
clEnumVal(mem2reg , "Promote alloca locations to registers"),
|
clEnumVal(mem2reg , "Promote alloca locations to registers"),
|
||||||
|
|
||||||
|
clEnumVal(internalize, "Mark all fn's internal except for main"),
|
||||||
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"),
|
||||||
|
Reference in New Issue
Block a user