Skip to content

Conversation

@andmadri
Copy link

The CheerpLowerAtomic and LowerGlobalDestructors were causing a seg fault when ran together with the opt tool and the -time-passes option. Apparently the llvm timer function could not time a pass if there were nested pass managers inside. I removed the FPM & MPM and replaced them with an object of the pass we were adding to them.

For testing purposes please try this:

/opt/cheerp/bin/opt -march=cheerp -cheerp-linear-output=wasm -cheerp-wasm-no-simd -cheerp-lower-atomics -cheerp-ito -passes="CheerpLowerAtomic,LowerGlobalDestructors" -o io_standard_optimized.bc io_standard_linked.bc

The CheerpLowerAtomic and LowerGlobalDestructors were causing a
seg fault when ran together with the opt tool and the -time-passes
option. Apparently the llvm timer function could not time a pass
if there were nested pass managers inside. I removed the FPM & MPM
and replaced them with an object of the pass we were adding to them.

For testing purposes please try this:

/opt/cheerp/bin/opt -march=cheerp -cheerp-linear-output=wasm
-cheerp-wasm-no-simd -cheerp-lower-atomics -cheerp-ito
-passes="CheerpLowerAtomic,LowerGlobalDestructors" -o
io_standard_optimized.bc io_standard_linked.bc
@andmadri andmadri requested a review from yuri91 November 17, 2025 09:33
@yuri91 yuri91 merged commit 8783e8f into master Nov 18, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants