Skip to content

arm regalloc: i64 consecutive-pair spill / coalescing (root of #168) #171

@avrabe

Description

@avrabe

Follow-up to #168 (mitigated by skip-and-continue in PR #169).

The ARM register allocator hard-fails with "no consecutive pair of free registers for i64" on i64-heavy functions (e.g. compiler_builtins::float::div). PR #169 makes --all-exports skip such a function instead of aborting the module, but the function still does not compile.

Real fixes (from the #168 suggestions), in increasing order of effort:

  1. Spill one operand of the i64 pair to a stack slot when no consecutive pair is free (graceful degradation).
  2. Register-pair coalescing / pre-coloring pass for i64 values so consecutive pairs are reserved up front.

This is what unblocks actually compiling (not just skipping) f64 division and other i64-heavy compiler_builtins.

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