[llvm-bugs] [Bug 52132] New: LLVM out of memory error when using new pass manager (after emsdk 2.0.17)

via llvm-bugs llvm-bugs at lists.llvm.org
Sun Oct 10 20:00:15 PDT 2021


https://bugs.llvm.org/show_bug.cgi?id=52132

            Bug ID: 52132
           Summary: LLVM out of memory error when using new pass manager
                    (after emsdk 2.0.17)
           Product: lld
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: wasm
          Assignee: unassignedbugs at nondot.org
          Reporter: amogh.raichur at autodesk.com
                CC: llvm-bugs at lists.llvm.org, sbc at chromium.org

LLVM version: 13.0.0.0-rc1
commit: 31e75512174e1bdaa242ee5c7f30fe56e68c3748

I am using the ninja build system with emscripten. I am able to build my
projects successfully with emsdk 2.0.15 and ninja JOB_POOLS_LINK property set
to 6 (i.e. max 6 parallel link processes).

However, after upgrading to emsdk 2.0.17+ (LLVM 13.0.0.0-rc1), wasm-ld throws
LLVM : out of memory exception OR the build process terminates with SIGKILL -9

In this case, I am able to build my projects only if the ninja JOB_POOL_LINK
property is set to 2 (i.e. max 2 parallel link processes).
Any more than 2 parallel link processes and I get the out of memory error.

I observed that using the -Wl, --lto-legacy-pass-manager linker option resolves
this issue. 

I also noticed that the LLVM legacy pass manager was the default setting till
2.0.15, but it was changed to the new LLVM pass manager in 2.0.17.

It seems like the new LLVM pass manager is causing increased memory consumption
when parallel linker processes are run.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20211011/8fdf2d78/attachment.html>


More information about the llvm-bugs mailing list