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
{{ message }}
Repository navigation
LICM: hoist calls to pure libm functions (-ftrust-libm) and relax CSE after them #44
Follow-up to #12 phase 2. This is verified-only work: the trusted semantics are already in place (ledger entry 8).
LICM hoisting of EF_runtime libm calls: about 700-900 lines, mostly proof.
A hoist may be an Icall to a known pure runtime function.
The preheader executes it; this is safe because libm_icall_progress shows the call always succeeds.
In-loop calls become moves.
LICM needs the defmap, as CSE has.
Motivation: perlin's floor(x)/floor(y) are invariant in the inner loop (a hand-written version gave about −20%).
CSE kill_cheap_computations: keep equations across pure libm calls, so recomputed arguments such as constants or (float)x are shared. In scratch this re-proved with no proof change; it needs benchmarking.
Note the errno policy (GCC's -fno-math-errno): with LICM, a hoisted call may run when the source's loop does not.
Activity