Page MenuHomePhabricator

[NaryReassociate] Add support for Mul instructions

Authored by volkan on Sep 14 2015, 2:34 PM.



This patch extends the current pass by handling Mul instructions as well.

Diff Detail


Event Timeline

volkan updated this revision to Diff 34734.Sep 14 2015, 2:34 PM
volkan retitled this revision from to [NaryReassociate] Add support for Mul instructions.
volkan updated this object.
volkan set the repository for this revision to rL LLVM.
volkan added a subscriber: llvm-commits.
jingyue requested changes to this revision.Sep 14 2015, 10:03 PM
jingyue edited edge metadata.

LG in general. Some code can be made clearer with refactoring. Thanks for working on this! It has been on my TODO list for quite a long time :)


Extract these lines to a helper function, e.g., matchTernaryOp that returns the opcode and outputs A and B as parameters.


Extract these lines to a helper function, e.g., getBinarySCEV.

This revision now requires changes to proceed.Sep 14 2015, 10:03 PM
volkan updated this revision to Diff 34807.Sep 15 2015, 9:45 AM
volkan edited edge metadata.
volkan marked 2 inline comments as done.

Added matchTernaryOp and getBinarySCEV functions to make the code clearer.

jingyue accepted this revision.Sep 15 2015, 9:54 AM
jingyue edited edge metadata.
This revision is now accepted and ready to land.Sep 15 2015, 9:54 AM
volkan abandoned this revision.Sep 15 2015, 11:47 AM

Committed rL247705.