[PATCH] D148001: [LICM] Reassociate & hoist sub expressions
Serguei Katkov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 26 00:34:13 PDT 2023
skatkov added a comment.
In D148001#4297996 <https://reviews.llvm.org/D148001#4297996>, @mkazantsev wrote:
> 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.
ok, will review after rebase.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D148001/new/
https://reviews.llvm.org/D148001
More information about the llvm-commits
mailing list