Skip to content

Performance regression / infinite loop with 0.11.3 release #219

@Mrmaxmeier

Description

@Mrmaxmeier

Hi,

I'm using Cranelift with opt_level=speed_and_size in a project and have run into a hang after updating to the current main branch of the wasmtime/cranelift repository. Git bisect points to this commit: b772c31ef "Cranelift: update to regalloc2 0.11.3."

My original reproducer is a single large Cranelift function (~30kb) that compiled almost instantly with the previous commit but hangs after the regalloc2 update. I'm not sure if the regression can also be triggered by WebAssembly modules.

$ time ./clif-util-bad compile --target=x86_64 --set opt_level=speed regression.clif
^C
Executed in   41.20 secs
$ time ./clif-util-good compile --target=x86_64 --set opt_level=speed regression.clif
Executed in   16.72 millis

Thanks!

CC #214 since this is the only change between 0.11.2 and 0.11.3

regression.clif.txt

reduced.clif.txt

BTW: Is there a way to reduce hangs/timeouts with clif-util bugpoint? I've hacked something together using shrinkray but I'm not fully convinced of the process. Cranelift-native tooling should probably be more effective 🙂

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions