[PATCH] D87448: [CodeGen] [WinException] Only produce handler data at the end of the function if needed

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 3 04:20:22 PST 2020


mstorsjo added a comment.

In D87448#2370894 <https://reviews.llvm.org/D87448#2370894>, @hans wrote:

> Sorry for the late follow-up, but this caused big problems in Chromium.
>
> This caused an explosion in ICF times during linking on Windows when libfuzzer
> instrumentation is enabled. For a small binary we see ICF time go from ~0 to
> ~10 s. For a large binary it goes from ~1 s to forevert (I gave up after 30
> minutes).
>
> See https://bugs.chromium.org/p/chromium/issues/detail?id=1144476
>
> I don't know if the real issue is with this commit, lld's icf code, or libfuzzer's instrumentation, but until that's figured out, I've reverted this patch in cbf25fbed5b46ec47e3ce2799ed9095f2f18ea8f <https://reviews.llvm.org/rGcbf25fbed5b46ec47e3ce2799ed9095f2f18ea8f> to bring things back to a working state.

Hmm, tricky. Functionally, afaik this commit still is ok (I haven't heard about a functional issue with the generated code), but it does indeed change the order of output sections, and it's plausible that the new order is suboptimal for some of those tools.

I'd appreciate if you or @rnk can dig into what makes it take so long (presumably in lld), and I could try to make an effort to redo this commit while preserving the section ordering. (Ideally we might even want to get text/xdata/pdata grouped as binutils does, see a comment further up, if that order works equally well.)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D87448/new/

https://reviews.llvm.org/D87448



More information about the llvm-commits mailing list