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

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to