This is an archive of the discontinued LLVM Phabricator instance.

[LSR] Allow giving priority to post-incrementing addressing modes
ClosedPublic

Authored by kparzysz on Mar 21 2018, 3:00 PM.

Details

Summary

Implement TTI interface for targets to indicate that the LSR should give priority to post-incrementing addressing modes. This is turned off by default (to preserve current behavior).

Combination of patches by Sebastian Pop and Brendon Cahoon.

Diff Detail

Repository
rL LLVM

Event Timeline

kparzysz created this revision.Mar 21 2018, 3:00 PM
sebpop accepted this revision.Mar 23 2018, 4:31 PM
sebpop added a subscriber: evandro.

The change looks good to me.
You may want to add a testcase to make sure this continues to work in the future.

@evandro do you think we would need to generate more post-increment addressing modes for aarch64 as well?

This revision is now accepted and ready to land.Mar 23 2018, 4:31 PM
This revision was automatically updated to reflect the committed changes.
kparzysz added a comment.EditedMar 26 2018, 7:13 AM

I'll add a testcase when I turn it on for Hexagon.