From b81da4b61664041d4c962c8362f9124a4daf4449 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 28 Apr 2002 05:49:53 +0000 Subject: [PATCH] Expose the internalize pass. llvm-svn: 2365 --- llvm/tools/opt/opt.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/llvm/tools/opt/opt.cpp b/llvm/tools/opt/opt.cpp index c4870d833db8..cc2b0a6ce345 100644 --- a/llvm/tools/opt/opt.cpp +++ b/llvm/tools/opt/opt.cpp @@ -20,6 +20,7 @@ #include "llvm/Transforms/SymbolStripping.h" #include "llvm/Transforms/ChangeAllocations.h" #include "llvm/Transforms/IPO/SimpleStructMutation.h" +#include "llvm/Transforms/IPO/Internalize.h" #include "llvm/Transforms/IPO/GlobalDCE.h" #include "llvm/Transforms/IPO/PoolAllocate.h" #include "llvm/Transforms/Scalar/DCE.h" @@ -54,7 +55,7 @@ enum Opts { trace, tracem, paths, // Interprocedural optimizations... - globaldce, swapstructs, sortstructs, poolalloc, + internalize, globaldce, swapstructs, sortstructs, poolalloc, }; static Pass *createPrintFunctionPass() { @@ -100,6 +101,8 @@ struct { { raiseallocs, createRaiseAllocationsPass }, { cleangcc , createCleanupGCCOutputPass }, { funcresolve, createFunctionResolvingPass }, + + { internalize, createInternalizePass }, { globaldce , createGlobalDCEPass }, { swapstructs, createSwapElementsPass }, { sortstructs, createSortElementsPass }, @@ -132,6 +135,7 @@ cl::EnumList OptimizationList(cl::NoFlags, clEnumVal(adce , "Agressive DCE"), clEnumVal(mem2reg , "Promote alloca locations to registers"), + clEnumVal(internalize, "Mark all fn's internal except for main"), clEnumVal(globaldce , "Remove unreachable globals"), clEnumVal(swapstructs, "Swap structure types around"), clEnumVal(sortstructs, "Sort structure elements"),