HomePhabricator

Re-reapply: Recover debug intrinsics when killing duplicated/empty blocks

Authored by StephenTozer on Feb 12 2020, 5:41 AM.

Description

Re-reapply: Recover debug intrinsics when killing duplicated/empty blocks

This reverts commit 636c93ed11a5f98b5c3ff88241460d61cb7785bb.

The original patch caused build failures on TSan buildbots. Commit 6ded69f294a9
fixes this issue by reducing the rate at which empty debug intrinsics
propagate, reducing the memory footprint and preventing a fatal spike.

Event Timeline

This is causing a timeout in chromium code. I haven't yet gotten a reduced repro, but it looks like there's an infinite loop.

This is causing a timeout in chromium code. I haven't yet gotten a reduced repro, but it looks like there's an infinite loop.

It's quite possible that this isn't an infinite loop, but instead a memory spike and massive increase in processing time - this has happened before with this patch (see the commit message). I can revert the commit, but it fixes an actual bug and it's unlikely that I'll be able to make much headway in fixing the issue without some more details on the broken build.

This is causing a timeout in chromium code. I haven't yet gotten a reduced repro, but it looks like there's an infinite loop.

Also, just to clarify a point from my previous comment: if I am correct about the cause of this problem, then it's possible that you will not be able to find a reduced reproducer, because it is the size of the object being compiled that causes the issue. The best I was able to do when this issue last came up was to identify the specific source file and opt pass that resulted in the exponential growth of intrinsics (ModuleMap.cpp and Jump Threading, respectively). If you can find the same, or provide more detailed build information, this patch can potentially land again after finding a fix.

Ah, I see. The file I used to reproduce is attached on this bug. I think it's being called from SimplifyCFG.

Ah, I see. The file I used to reproduce is attached on this bug. I think it's being called from SimplifyCFG.

I can't see the bug, I get "Permission denied" - can you reference the actual filename here?

Sorry about that! The file is third_party/icu/source/i18n/number_decimfmtprops.cpp in chromium source. I put the preprocessed repro here: https://reviews.llvm.org/P8196.