[PATCH] D39976: [AArch64] Query the target when folding loads and stores

Evandro Menezes via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 2 11:56:37 PDT 2018


evandro added a comment.

In https://reviews.llvm.org/D39976#1054542, @gberry wrote:

> In https://reviews.llvm.org/D39976#1049844, @evandro wrote:
>
> > This change is more generic and flexible than `FeatureSlowPaired128`.  This change controls not only when loads and stores are paired, but also other foldings that this pass performs, including the pre or post indexing of the offset register.
>
>
> That's not what the code looks like it is doing.  isReplacementProfitable() is only being called from mergeUpdateInsn(), which is only called when folding to form base register incrementing load/stores.


For now, as it's a generic enough interface to be used by many other peephole optimizations.

>> AFAIK, the code performs table look ups, which should be fairly efficient.  And, yes, just like there are differences in how well some loads and stores perform in https://reviews.llvm.org/M1 and M3, it's likely that more differences will come in their successors.
> 
> The patch also adds a function pointer call for each potential instruction pair to be optimized.  I'm not that bothered by the compile-time impact of this, it just seems like too specific of a subtarget hook to be adding to me.  I would appreciate hearing what other people think about this.

So am I.

Thank you for the feedback.


https://reviews.llvm.org/D39976





More information about the llvm-commits mailing list