Skip to content

Large compile-time-memory-usage regression with regalloc2 #4291

@alexcrichton

Description

@alexcrichton

This WebAssembly file which is reduced to a single function from this issue complies like this on main:

$ /usr/bin/time -v ./target/release/wasmtime compile extract.wasm
...
        Elapsed (wall clock) time (h:mm:ss or m:ss): 0:08.58
...
        Maximum resident set size (kbytes): 6565472
...
        Exit status: 0

when compared to wasmtime 0.36.0 which is pre-regalloc2, however, this yields:

$ /usr/bin/time -v ./wasmtime-v0.36.0-aarch64-linux/wasmtime compile ./extract.wasm
...
        Elapsed (wall clock) time (h:mm:ss or m:ss): 0:00.86
...
        Maximum resident set size (kbytes): 215264
...
        Exit status: 0

I think this means that what previously took ~200M to compile is now taking upwards of 6.5G.

Metadata

Metadata

Assignees

No one assigned

    Labels

    cranelift:goal:compile-timeFocus area: how fast Cranelift can compile or how much memory it uses.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions