[PATCH] D71993: [Transforms][GlobalSRA] huge array causes long compilation time and huge memory usage.
Alexey Lapshin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 30 06:57:43 PST 2019
avl marked an inline comment as done.
avl added inline comments.
================
Comment at: llvm/lib/Transforms/IPO/GlobalOpt.cpp:512-513
unsigned NumElements = STy->getNumElements();
- if (NumElements > 16 && GV->hasNUsesOrMore(16))
+ if (NumElements > 16)
return nullptr; // It's not worth it.
NewGlobals.reserve(NumElements);
----------------
lebedev.ri wrote:
> It looks like this makes bailout more strict, therefore it likely regresses something else?
llvm test-suite did not show any regressions.
Generally speaking, big array accessed only through constant indexes and having less than 16 usages - looks like quite specialized use case.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71993/new/
https://reviews.llvm.org/D71993
More information about the llvm-commits
mailing list