Open Quuxplusone opened 3 years ago
Attached Disasm.bc.gz
(908625 bytes, application/x-gzip): LLVM IR that causes OOM
When there's enough RAM, it takes over 200 seconds to complete the pass.
[2020-12-09 11:56:34.086331000] 0x7ffdd020e550 Executing Pass 'WebAssembly Fix Irreducible Control Flow' on Function '_ZNK5clang6interp8Function4dumpERN4llvm11raw_ostreamE'...
[2020-12-09 11:59:01.839372000] 0x7ffdd020e550 Freeing Pass 'WebAssembly Fix Irreducible Control Flow' on Function '_ZNK5clang6interp8Fu
I'm not sure what the LLVM usage of the "assignee" field is. I may not have time to look at this any time soon, so if someone else wants to look earlier, feel free to unassign me. Otherwise you can leave me assigned.
@kripken, I picked you because IIRC you wrote that code, but I should probably have just CC'd you and let you decide if you want to take it on.
No problem, that's what I figured. I just wanted to clarify that I can find time for this eventually, but it won't be any time soon since I'm swamped, so others should feel free to take it. (If leaving someone as "assignee" in this bug tracker doesn't fit that, feel free to unassign me - I'm just not familiar with the process here in LLVM-land.)
I've found a workaround. The overall code layout is as follows:
foreach instr in chunk:
switch instr.opcode:
case op1:
printOp1NameLoop
...
case op2:
printOp2NameLoop
...
...
There are 446 opcodes in total. Under each case label there's a nested loop
printing the name of the particular opcode. Each loop is created due to
PrintName lambda function getting inlined.
Compilation time went back to normal after preventing the lambda function from
getting inlined.
Disasm.bc.gz
(908625 bytes, application/x-gzip)