Skip to content

Slow optimizations on Dart binary #6042

@tlively

Description

@tlively

There is a dart binary that takes extremely long to optimize with this command:

wasm-opt -g -all --closed-world -tnh --type-unfinalizing -O3 --type-ssa --gufa -O3 --type-merging -O1 --type-finalizing

Most passes run in under a second, except that in the first -O3:

  • ssa-nomerge takes 90s
  • precompute-propagate takes 104s
  • heap2local takes 55s
  • local-subtyping takes 56s
  • code-folding takes 77s
  • dae-optimizing takes 361s
  • optimize-stack-ir takes 36s

Overall, the first -O3 takes 836s. After that GUFA takes 31s and the second -O3 takes 410s. The -O1 takes 10s, spending most of its time in two executions of coalesce-locals that take 3s each.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions