[PATCH] D82343: Preserve GlobalsAA analysis result in InjectTLIMappings
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 25 02:30:45 PDT 2020
fhahn added a comment.
In D82343#2112753 <https://reviews.llvm.org/D82343#2112753>, @nikic wrote:
> I noticed that this change had a somewhat peculiar optimization impact: text size diffs <https://llvm-compile-time-tracker.com/compare.php?from=e07a8b5efd60f25de84ac89783a5e326dc414cef&to=f64dc4e6866c2ab88148abb7d8a27e3828f978e4&stat=size-text> There's some fairly large changes, but only for the ReleaseLTO -g case. Is there any obvious reason why that configuration would be affected, while others weren't?
Yes I think that's expected. As an additional data pointer, we have been seeing 4-8% runtime regressions without this patch in several SPEC benchmarks.
Without preserving it in InjectTLIMappings (which is requested by LoopVectorize), GlobalsAA is not available in LV. Without it, it will either result in code not being vectorized or vectorized with runtime checks (which means we have to keep both a copy of the vectorized and non-vectorized loop around). And GlobalsAA should be much more likely to deduce no alias with LTO, given the more complete pictures of globals.
Arguably, it might be even better to not schedule InjectTLIMappings via the pass manager, because of the subtle invalidation of other analysis requested by the same pass. But that's a potential follow-up I think.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D82343/new/
https://reviews.llvm.org/D82343
More information about the llvm-commits
mailing list