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

Anna Thomas via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 25 09:19:18 PDT 2023


anna 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.

Strongly agree with this :)


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

https://reviews.llvm.org/D148001



More information about the llvm-commits mailing list