Skip to content

[CI] Rebase batch A onto 63bcca4 (#2785, #2664, #2207, #2210, #2167) - #7

Closed
RVZO6 wants to merge 5 commits into
mainfrom
rvzo/rebase-63bcca4-ci-a
Closed

RVZO6 wants to merge 5 commits into
mainfrom
rvzo/rebase-63bcca4-ci-a

Conversation

@RVZO6

@RVZO6 RVZO6 commented Nov 26, 2026

Copy link
Copy Markdown
Owner

Temporary fork-only CI validation PR for rebasing Marvisak#2785, Marvisak#2664, Marvisak#2207, Marvisak#2210, Marvisak#2167 onto 63bcca4. Will be closed once checks pass.

@coderabbitai

coderabbitai Bot commented Nov 26, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

…, O(log S) scalar lookup, and stack scratch in resource::track

Speed up resource::track with identical Resources output:
- Compute ir::reverse_postorder once in Tracer::new and reuse it across
  propagate_copies (avoiding 2nd/3rd RPO walks).
- Settle non-copy and constant writes once in round 0 of propagate_copies,
  recording only phis and value-copy edges in a sparse RPO work list and
  converging in 1 pass when no operand observes None on round 0.
- Merge defs/phis/inputs (3 Vecs, 52 B/Value) into a single compact
  Vec<Def> (12 B/Value).
- Use binary_search_by_key on strictly-sorted out.scalar in track().
- Replace small temporary Vecs in few_atoms(), descriptor(), edge_taken(),
  and select() with stack arrays on the common path.

Measured on 13f91ca (--release resource::tests::bench_resource_track,
median of 3x50 runs, identical Resources output):
- acyclic (4,584 insts, 128 scalar loads, 256 buffer loads): 245.6 -> 138.0 us/run (1.78x, -43.8%)
- loop (2,007 insts with phis):                               46.3 ->  27.7 us/run (1.67x, -40.2%)

Assisted-by: T3 Code (Antigravity, gemini-4-neon)
…fects dedup

Eliminate hot per-instruction and CFG Vec heap allocations in gfx10::fields and ir::build:
- gfx10/fields.rs: zero-alloc valu_dwords + VOP3B scoping
- ir.rs: stack Exit::succs() small array instead of Vec<usize> per CFG visit
- ir.rs: O(1) RegSet deduplication in effects() preserving first-occurrence order

(Note: RegSet::members() bit-scan already landed on main in 63bcca4 and was dropped from this PR during rebase.)

Assisted-by: T3 Code (Antigravity, gemini-4-neon)
Cache loaded 4-dword USER_DATA CBV rows (index / 4) and extracted dwords
(index) in the entry block so repeated or same-row user-data accesses
reuse the existing cbufferLoadLegacy.i32 and extractvalue instructions.

Replaces the previous hand-written bitcode reader test with a small
Module::written_calls).

Measured on 13f91ca (--release bench_user_data_cache, 32 dwords / 8 rows
read 4x = 128 reads):
- DXIL size:                 4,460 -> 2,616 B (-41.3%)
- cbufferLoadLegacy.i32 ops:   128 -> 8       (-93.8%)
- extractvalue ops:            128 -> 32      (-75.0%)
- Lowering time:             411.7 -> 306.3 us/run (1.34x, -25.6%)

Assisted-by: T3 Code (Antigravity, gemini-4-neon)
…ort scans in Lower with O(1) dense Vec tables

Replace per-lookup HashMap hashing and linear scans over block.insts in
Lower with O(1) dense Vec tables built once in Lower::new (identical DXIL):
- def_block: Vec<Option<usize>> and def_site: Vec<Option<Site>> indexed by
  Value.0, eliminating linear scans in def_inst, pair_high, mask_dword,
  mask_number, and whole.
- done_export: Vec<bool> per block, replacing has_done_export's scan.
(Dropped the earlier resource::track HashMap change after benchmarking
showed SipHash insertion overhead outweighed scanning out.scalar.)

Measured (--release bench_o1_lookups_large_shader, 2,821-inst PS):
- emit::lower: 3,571.7 -> 2,939.8 us/run (1.21x, -17.7%)

Trimmed lower.rs tests to a single equivalence check comparing the new
tables against the old linear scans.

Assisted-by: T3 Code (Antigravity, gemini-4-neon)
…page-table loads

Coalesce 8-byte (view, start) page-table and (base, phase) view-mark
loads via raw_dword2 (mask 3, alignment 8), cache memory_null once in
the entry block across title-memory accesses, omit the second dirty
mark statically for single-byte writes, hoist the n != bits[0] guard
before bitmap word/bit loads, and guard every dirty-mark atomicBinOp
OR with a test-before-atomic rawBufferLoad check without WAVE_OPS.

Assisted-by: T3 Code (Antigravity, gemini-4-neon)
@RVZO6
RVZO6 force-pushed the rvzo/rebase-63bcca4-ci-a branch from 76e6715 to 2861427 Compare November 26, 2026 00:18
@RVZO6 RVZO6 closed this Nov 26, 2026
@RVZO6
RVZO6 deleted the rvzo/rebase-63bcca4-ci-a branch November 26, 2026 00:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant