You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
armv6m: Reduce heuristic threshold for maybe_flush_literal_pool
Literal pools need to be within 1024 bytes because of limited range of
ldr reg, [pc, #imm] instruction. A pool is emitted when mov_immediate is
called and the pool reference is farther than a given threshold. Emitting
the pool in such a condition requires a branch over the pool, and is
therefore less efficient than the usual pool flush that happens when a
branch is emitted (tail calls).
This threshold was set to 900 but new test module bigint.beam wouldn't
compile. This commit changes the threshold to 512 which works (the test
actually requires 663).
The optimal threshold value depends on the pattern usage of mov_immediate.
If regular code hits the bug, we may need to change the heuristic and emit the
pool based on other conditions.
Signed-off-by: Paul Guyot <[email protected]>
0 commit comments