Ticket #5173 (closed feature request: fixed)
Implement forward substitution of constants in the Cmm mini-inliner
| Reported by: | tibbe | Owned by: | simonmar |
|---|---|---|---|
| Priority: | high | Milestone: | 7.2.1 |
| Component: | Compiler | Version: | 7.0.3 |
| Keywords: | Cc: | johan.tibell@…, dterei | |
| Operating System: | Unknown/Multiple | Architecture: | Unknown/Multiple |
| Type of failure: | None/Unknown | Difficulty: | |
| Test Case: | Blocked By: | ||
| Blocking: | Related Tickets: |
Description
While working on a new set of primops for copying arrays, I ran into a Cmm optimizer issue where constants weren't being inlined if the temporary that the constant was assigned to was used more than once. Example:
fn
{
bits64 a, b;
a = 1;
b = a + a;
RET_N(b);
}
is optimized as
fn() { []
}
ca: _cb::I64 = 1;
R1 = _cb::I64 + _cb::I64;
jump (I64[Sp + 0]) ();
}
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

