[PATCH] D87972: [OldPM] Pass manager: run SROA after (simple) loop unrolling
Florian Hahn via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Sep 20 03:50:27 PDT 2020
fhahn added a comment.
Surprising this causes only such a small perf regression. I guess it should be OK given that, but here probably are some pathological cases out there where this may cause some noticeable compile-time regressions.
IIUC the additional cases this catches come mainly from fully unrolled loops. If only we had a better way to conditionally run passes :) Then we would ideally only run SROA (and other additional simplification passes) late on functions that had loops fully unrolled. One lightweight way to do so would be to have loop unroll add an 'additional-simplification' attribute to functions that contain loops which it full unrolled and have SROA just run again late if the attribute is present. A similar approach may be helpful in other places too (e.g. the off-by-default `-extra-vectorizer-passes` option, https://github.com/llvm/llvm-project/blob/master/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp#L774)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D87972/new/
https://reviews.llvm.org/D87972
More information about the cfe-commits
mailing list