[PATCH] D148001: [LICM] Reassociate & hoist sub expressions

Max Kazantsev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 25 23:34:32 PDT 2023


mkazantsev added a comment.

In D148001#4295213 <https://reviews.llvm.org/D148001#4295213>, @skatkov wrote:

> General question: don't you want to separate sub and add handling in completely different functions. 
> To be honest, there will be small code duplication but in this case no need to mixup add and sub logic.
> It will be easier to review and support in the future.
>
> If duplication is a problem you can create functions for sub and add to keep first and last lines are in common.

But code for sub is exactly same as the code that handles both add and sub, with 2 lines of difference.


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

https://reviews.llvm.org/D148001



More information about the llvm-commits mailing list