// Interprocedural constant propagation now that basic cleanup has occurred // and prior to optimizing globals. // FIXME: This position in the pipeline hasn't been carefully considered in // years, it should be re-analyzed. MPM.addPass(IPSCCPPass( IPSCCPOptions(/*AllowFuncSpec=*/ Level != OptimizationLevel::Os && Level != OptimizationLevel::Oz && !isLTOPreLink(Phase)))); // Attach metadata to indirect call sites indicating the set of functions // they may target at run-time. This should follow IPSCCP. MPM.addPass(CalledValuePropagationPass());
I am not able to understand the reason behind the comment:
// Attach metadata to indirect call sites indicating the set of functions
// they may target at run-time. This should follow IPSCCP.
I am not able to figure out the exact reason behind this requirement, why should CalledValuePropagationPass() follow the IPSCCP pass ?
Is it because we are doing interprocedural constant propagation, and that we need to propagate called values as well ?