[PATCH] D96772: [LSR] Cleanup of getPreferredAddresingMode. NFC.
Sam Parker via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 16 09:11:02 PST 2021
samparker added inline comments.
================
Comment at: llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:3814
+ bool FavorPreIndexed = EnableBackedgeIndexing &&
+ AMK == TTI::AMK_PreIndexed;
+ if (FavorPreIndexed && LU.Kind == LSRUse::Address) {
----------------
SjoerdMeijer wrote:
> > Should the EnableBackedgeIndexing option override what the target defines? Or could it be removed, or replaced?
>
> Good point. I think in general an option takes precedence, but that's not really happening here.
>
> I think haIving an option for this would be good (I noticed it would at least be convenient for testing), which accepts values that match the values this hook returns: preindexed, postindexed, and none. I was thinking of doing that as a follow up of this NFC, so that would mean generalising and renaming this `EnableBackedgeIndexing` if that sounds like a good idea (so leave this as a NFC).
I was also going to suggest, in the previous patch, to just remove the option. I just added it for testing and I don't think it's useful now.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D96772/new/
https://reviews.llvm.org/D96772
More information about the llvm-commits
mailing list