1
$\begingroup$

Reading the Wikipedia pages on these topics, it seems that sparse conditional constant propagation (SCCP) is a more powerful form of constant propagation (CP)? E.g all optimizations available in CP are subsumed in SCCP.

$\endgroup$

1 Answer 1

1
$\begingroup$

In general, SCCP will remove the unreachable blocks based on the previous const propagation, that's why it can propagate more constant (some phi's oprands can be removed)

And it's sparse, which means it runs on SSA form IR, that would make the analysis and procedure faster.

I read from a blog that there are four kinds of constant propagation, that is

  • (simple) constant propagation
  • conditional constant propagation
  • sparse constant propagation
  • sparse conditional constant propagation : the most powerful

Based on the attributes of each algorithm, I guess we can understand what they do.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.