[PATCH] D45834: [TTI] Add a hook to TTI for choosing scalarized shuffle-reduction sequence for reduction idiom

Hideki Saito via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 20 11:40:54 PDT 2018


hsaito added a comment.

Farhana,

It looks to me that you are trying to fine-tune the final step of log-2 reduction. In my opinion, such an optimization should be done in the Target. 
There are probably downstream optimizers looking for proper log-2 shuffle sequence to detect reduction last value compute and this change will
break that for the affected target. Is that what you'd like to do? Also, the newly introduced TTI interface name doesn't convey enough information
about fine-tuning only the last step.

If you really think this change should benefit all targets (you mentioned that in https://reviews.llvm.org/D45393), you shouldn't be doing this through TTI as a long
term solution. Have a proper discussion in llvm-dev and get major Targets to agree with you first. Then, TTI should help migrate Targets

- and finally get rid of TTI interface after the migration.

Thanks,
Hideki


https://reviews.llvm.org/D45834





More information about the llvm-commits mailing list