Changeset View
Changeset View
Standalone View
Standalone View
lib/Transforms/IPO/PassManagerBuilder.cpp
Show First 20 Lines • Show All 646 Lines • ▼ Show 20 Lines | if (OptLevel > 1) { | ||||
PM.add(createIPSCCPPass()); | PM.add(createIPSCCPPass()); | ||||
} | } | ||||
// Infer attributes about definitions. The readnone attribute in particular is | // Infer attributes about definitions. The readnone attribute in particular is | ||||
// required for virtual constant propagation. | // required for virtual constant propagation. | ||||
PM.add(createPostOrderFunctionAttrsLegacyPass()); | PM.add(createPostOrderFunctionAttrsLegacyPass()); | ||||
PM.add(createReversePostOrderFunctionAttrsPass()); | PM.add(createReversePostOrderFunctionAttrsPass()); | ||||
// Split globals using inbounds annotations on GEP indices. This can help | |||||
// improve the quality of generated code when virtual constant propagation or | |||||
// control flow integrity are enabled. | |||||
PM.add(createGlobalSplitPass()); | |||||
// Apply whole-program devirtualization and virtual constant propagation. | // Apply whole-program devirtualization and virtual constant propagation. | ||||
PM.add(createWholeProgramDevirtPass()); | PM.add(createWholeProgramDevirtPass()); | ||||
// That's all we need at opt level 1. | // That's all we need at opt level 1. | ||||
if (OptLevel == 1) | if (OptLevel == 1) | ||||
return; | return; | ||||
// Now that we internalized some globals, see if we can hack on them! | // Now that we internalized some globals, see if we can hack on them! | ||||
▲ Show 20 Lines • Show All 247 Lines • Show Last 20 Lines |