[PATCH] D89566: [LV] Epilogue Vectorization with Optimal Control Flow
Bardia Mahjour via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 16 10:09:46 PST 2020
bmahjour added inline comments.
================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:5714
+ // Original loop vector factor should be at least 16.
+ if (MainLoopVF.getFixedValue() < 16)
+ return Result;
----------------
SjoerdMeijer wrote:
> bmahjour wrote:
> > SjoerdMeijer wrote:
> > > bmahjour wrote:
> > > > SjoerdMeijer wrote:
> > > > > Why is this 16? Do we need to put this "magic constant" behind a target hook? Or calculate this?
> > > > This part is copied from D88819. The value 16 is chosen because it catches the x264 opportunity. As I've been saying all along, we need to replace this with a better cost-model. The cost-modeling work is not in the scope of this patch.
> > > I think that's fine, but we should at least hide this 16 behind a TTI hook that e.g. defaults to 16, which should be a separate patch.
> > A reasonable cost function can probably be developed with the existing TTI hooks, so a new one may actually not be necessary. I agree to deferring this to a separate patch.
> Okay, but can we stub it out for now? If we don't need a new TTI function, can we create a new helper function and at least sketch a way how this can be calculated. It can still just default to returning 16, but I just don't think we should keep the 16 hard coded here.
Ok, sure. I've added an option to make it configurable too.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D89566/new/
https://reviews.llvm.org/D89566
More information about the llvm-commits
mailing list