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: unassignedb...@nondot.org
          Reporter: amogh.raic...@autodesk.com
                CC: llvm-bugs@lists.llvm.org, s...@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to