Fix a significant performance regression by introducing GlobalValueVisited field and reusing the map.
This is a follow up to r257823 that slowed down linking Chrome with LTO by 2.5x.
If you revert this commit, please, also revert r257823.
Differential D16338
[Verifier] Fix performance regression for LTO builds krasin on Jan 19 2016, 5:04 PM. Authored by
Details Fix a significant performance regression by introducing GlobalValueVisited field and reusing the map. If you revert this commit, please, also revert r257823.
Diff Detail Event Timeline
Comment Actions Since it's a pretty basic fix that does not change the logic (except of reusing GlobalValueVisited, which was already reviewed), I will go ahead and submit this revision. Feel free to revert it, but in this case, I would also ask to revert r257823, so that we unbreak 'CFI Linux ToT' buildbot in Chrome. Feel free to improve the CL (for example, by making forEachUser more reusable), but please, keep an eye on https://build.chromium.org/p/chromium.fyi/builders/CFI%20Linux%20ToT.
Comment Actions I felt lonely and made another round of trials. Turns out it's the map reuse (or the lack of thereof) was the reason for the regression.
Comment Actions No problem. While my knowledge of lib/IR is limited (so, your guidance was very helpful), I really was in the position to reliably reproduce the issue. |
What was the problem with this being a lambda? I missed why you needed to change this for this patch?