[PATCH] D53865: [LoopVectorizer] Improve computation of scalarization overhead.

Hideki Saito via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 19 15:23:32 PST 2018


hsaito added a comment.

> Unfortunately, this could not be done with computeInstDiscount() as a simple extension of (1), since memory accesses are dealt with before anything else.

If we change "memory widening decision" from "hard decision" to "soft decision to be finalized after collect scalars", we might be able to solve that. In general, I don't think this is any different from data flow based optimization problem

- and the standard solution there is do this iteratively. So, some form of going back and revise the prior decision is inevitable if we want to improve this.

In any case, the newer code you have written is more generically applicable, and the improvements needed on top of that is also generically applicable. Best of all, we don't have to teach downstream optimizers about the weirdness in cost modeling. 
That's what I was aiming for in reviewing your change.

Is the uploaded code ready for review? Or shall we continue discussing the approach?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D53865/new/

https://reviews.llvm.org/D53865





More information about the llvm-commits mailing list