[PATCH] D32166: Improve LoopVectorizers estimation of scalar loops by predicting LSR behaviour

Renato Golin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 2 12:36:20 PDT 2017


rengolin added a comment.

Hi Jonas,

As much as this helps, I think duplicating the LSR logic here, even if a very limited subset of it, is problematic.

If assumptions change with time, you may start having increasingly different results and not detect them until the more pathological cases start to explode.

In cases like this, in the past, we discussed splitting the analysis pass from the execution pass on the targeted transformation. IIRC, this is how the loop analysis passes were born.

Maybe, if you move the LSR analysis code to the generic loop pass side, and both LSR and LV use the same analysis, you can work around the issue without duplicating anything.

Makes sense?

cheers,
--renato


https://reviews.llvm.org/D32166





More information about the llvm-commits mailing list