MaskRay wrote: > Huh, this is unexpected -- especially that this regression primarily hits > O0g. Intuitively, I would suspect that the > PMDataManager::removeNotPreservedAnalysis lambda is not inlined (legacy PM is > comparatively more expensive in O0); but I haven't verified this.
Good call. In a CT experiment that reverts only `PMDataManager::removeNotPreservedAnalysis` back to the pre-#198982 erase-while-iterating loops, https://llvm-compile-time-tracker.com/compare.php?from=f6e4e71fcdbff98cb060f87695c75f00b43bf918&to=79e5f55c1c2aab9ffcd9d4665314c81daf38f709&stat=instructions:u ``` The deltas come back as a near-exact mirror image of the regression: ┌─────────────────────┬──────────────────────┬─────────────────────┐ │ config │ regression (#198982) │ revert just this fn │ ├─────────────────────┼──────────────────────┼─────────────────────┤ │ stage1-O0-g │ +0.13% │ −0.13% │ ├─────────────────────┼──────────────────────┼─────────────────────┤ │ stage1-aarch64-O0-g │ +0.16% │ −0.15% │ ├─────────────────────┼──────────────────────┼─────────────────────┤ │ stage2-O0-g │ +0.15% │ −0.16% │ ├─────────────────────┼──────────────────────┼─────────────────────┤ │ stage1-O3 │ +0.04% │ −0.03% │ └─────────────────────┴──────────────────────┴─────────────────────┘ ``` So the entire O0-g regression is this one function; the rest of the patch is neutral. https://github.com/llvm/llvm-project/pull/198982 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
