Impl/topic29 - #70
Impl/topic29#70FeelTheBeats wants to merge 7 commits into
Conversation
…lar lowering Phase 1: IR vector opcodes + builder APIs, FOR strip-mining vectorizer with scalar remainder clone, per-lane scalar lowering in the instruction selector, encoder vector-mnemonic rejection, and --vectorize / --vector-width / --vector-isa wiring on both CLI and config sides. RVV deferred. Codegen also materializes constant operands for R-type instructions and emits encoder-safe memory operands so the vectorized programs are executable by the existing RV32IM emulator.
🤖 AI Code Review
📁
|
- track the post-rewrite strip ENDFOR index so the scalar remainder is inserted as its sibling instead of nesting (longer body) or landing after return (shorter body, dead code) (review F1) - scan for the rewritten region's top-level ENDFOR when resuming the pass so consecutive remainder loops are handled correctly (F1) - reject loops whose region-local definitions (including the original induction variable) escape the region, avoiding dangling SSA values (region-value-escapes, F2) - tighten C7 aliasing: different base names are only accepted when both are constant addresses with provably disjoint ranges; name-based overlap such as src = sub(out, 4) is now rejected (F3) - validate strip width (int >= 2) in Vectorizer.__init__ (F6)
- reject vectorize + backend=llvm in compile(): the LLVM backend turned vector ops into comments and returned success=True (review F5) - validate vector_width before parsing and return CompileResult failure instead of ZeroDivisionError deep in the pass (F6) - fall back from reg_alloc=linear to greedy with a warning when vectorize is enabled (linear-scan label emission is broken, F7)
- structural regressions for remainder placement (shorter/longer vector
body x W=2/4), consecutive remainder loops, IV and region-local
live-out, cross-base aliasing, width validation (review F1-F4, F6)
- executable differential matrix W x {divisible, remainder} x {map,
broadcast, in-place} plus explicit F1 reproductions; W=4+remainder
map/broadcast stay structural because the pre-existing greedy
allocator cannot spill/reload beyond 19 vregs (review section 4)
- driver tests for llvm-backend rejection, invalid width and linear ->
greedy fallback (F5-F7)
- sync design/development docs: C6 live-out, conservative C7, new
rejection reason, remainder insertion and driver preconditions
No description provided.