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
Emit mustprogress and add --fast-math for loop optimizations/vectorization (#198)
* Emit mustprogress on lowered functions to unlock loop optimizations
Every ts function lowered to LLVM carried no function attributes at
all, including mustprogress. Without it, LLVM's -O2/-O3 loop passes
(LICM, unrolling, vectorization) must stay conservative since they
can't assume a loop terminates or has an observable side effect.
Verified with an isolated integer-bounded reduction loop that -O3
neither unrolled nor vectorized it despite a clean, SCEV-friendly
shape; after this change the attribute is correctly emitted and the
full 681-test suite (compile + JIT) still passes unchanged.
Fast-math flags (needed for FP-reduction vectorization) are
intentionally left out of this change since they'd change IEEE-754
semantics and should be an explicit opt-in, not bundled here.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
* fast math attribute support
---------
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
0 commit comments