[PATCH] D56242: Elevate instructions across if-else blocks for better constant propagation

Ayonam Ray via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 9 12:30:37 PST 2019


ayonam added a comment.

In D56242#1347595 <https://reviews.llvm.org/D56242#1347595>, @lebedev.ri wrote:

> In D56242#1347585 <https://reviews.llvm.org/D56242#1347585>, @ayonam wrote:
>
> > Yes, I too am of the same opinion.  However, the other two passes that hoist code are ConstantHoisting and GVNHoisting.  While the former hoists constants the latter hoists expressions from branches to the common dominator.  What the Elevate pass does is to hoist expressions from a join block to its predecessors if the expressions can be constant evaluated.  (In effect, it does the reverse of what the Sink pass does - to sink expressions into the join block from its predecessors).
>
>
> All that is a very good point, and i think it even reinforces my previous point.
>  I think it would be best to be consistent, and call this `InstructionHoisting`.


Point taken.  I will rename the pass as InstructionHoisting.  Once all the other review comments are in, I'll make this change as part of all the other changes that would come with the review comments.


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

https://reviews.llvm.org/D56242





More information about the llvm-commits mailing list