#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"
trace, tracem, paths,
// Interprocedural optimizations...
- globaldce, swapstructs, sortstructs, poolalloc,
+ internalize, globaldce, swapstructs, sortstructs, poolalloc,
};
static Pass *createPrintFunctionPass() {
{ raiseallocs, createRaiseAllocationsPass },
{ cleangcc , createCleanupGCCOutputPass },
{ funcresolve, createFunctionResolvingPass },
+
+ { internalize, createInternalizePass },
{ globaldce , createGlobalDCEPass },
{ swapstructs, createSwapElementsPass },
{ sortstructs, createSortElementsPass },
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"),