// Opts enum - All of the transformations we can do...
enum Opts {
// Basic optimizations
- dce, die, constprop, gcse, inlining, constmerge, strip, mstrip, mergereturn,
+ dce, die, constprop, gcse, licm, inlining, constmerge,
+ strip, mstrip, mergereturn,
// Miscellaneous Transformations
raiseallocs, lowerallocs, funcresolve, cleangcc, lowerrefs,
{ die , createDeadInstEliminationPass },
{ constprop , createConstantPropogationPass },
{ gcse , createGCSEPass },
+ { licm , createLICMPass },
{ inlining , createFunctionInliningPass },
{ constmerge , createConstantMergePass },
{ strip , createSymbolStrippingPass },
clEnumVal(die , "Dead Instruction Elimination"),
clEnumVal(constprop , "Simple constant propogation"),
clEnumVal(gcse , "Global Common Subexpression Elimination"),
+ clEnumVal(licm , "Loop Invariant Code Motion"),
clEnumValN(inlining , "inline", "Function integration"),
clEnumVal(constmerge , "Merge identical global constants"),
clEnumVal(strip , "Strip symbols"),