[PATCH] D157408: [SCCP][PhaseOrdering] Mark Overdefined for loading from null

luxufan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 9 07:15:03 PDT 2023


StephenFan added a comment.

In D157408#4572535 <https://reviews.llvm.org/D157408#4572535>, @nikic wrote:

> What is the original, non-artificial motivation for this?

It was found when I updated the other SCCP patch D153717 <https://reviews.llvm.org/D153717>. So there is no non-artificial motivation for it.

> This will not always be a positive change, because IPSCCP itself may become less effective (e.g. if one of the contributors to a phi is a load from null, we won't be able to ignore that incoming value anymore).

Yes. What this patch does makes IPSCCP solve inter-procedure transformation and phis less effective. Can we make willReturn return false for loading null? Then we can preserve these loading from null instructions in many passes and let instcombine and simplifyCFG to transform it to unreachable and delete some dead blocks.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D157408/new/

https://reviews.llvm.org/D157408



More information about the llvm-commits mailing list