[PATCH] D73480: [VectorCombine] new IR transform pass for partial vector ops
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 31 10:08:47 PST 2020
spatel added a comment.
In D73480#1850467 <https://reviews.llvm.org/D73480#1850467>, @efriedma wrote:
> I think the general idea of a pass that uses vector cost models to do peephole optimizations on vectors makes sense. A couple general concerns:
>
> 1. If we're running it in the middle of the pipeline, we need to be careful the transforms don't conflict with instcombine.
AFAIK, the closest we've come to overlapping/conflicting with vector<->scalar transforms is D50992 <https://reviews.llvm.org/D50992>. I'd be happy to abandon that in favor of a cost-aware transform here. Similarly, we could move some questionable shuffle transforms and/or vector demanded elements analysis out of InstCombine to live here. That would likely have a side benefit of making the optimizer slightly faster overall since we don't need to run this pass as often as InstCombine.
> 2. The vectorizer's cost model is optimized for throughput; I'm a little worried we'll run into issues with latency if we depend too much on the cost model for scalar code.
We do have: TargetTransformInfo::getInstructionLatency(const Instruction *I)
...but I don't see it used/overridden anywhere in tree currently.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D73480/new/
https://reviews.llvm.org/D73480
More information about the llvm-commits
mailing list