Skip to content

LinxISA: package the PTO C++ frontend ABI - #69

Merged
zhoubot merged 3 commits into
mainfrom
codex/pto-isa-0.58.3-cxx-frontend
Aug 22, 2026
Merged

LinxISA: package the PTO C++ frontend ABI#69
zhoubot merged 3 commits into
mainfrom
codex/pto-isa-0.58.3-cxx-frontend

Conversation

@zhoubot

@zhoubot zhoubot commented Aug 22, 2026

Copy link
Copy Markdown
Collaborator

Closes #67.
Closes #68.

Summary

  • install and automatically include the compiler-owned linx_blkc.h resource header for Linx C++
  • provide exact PTO scalar and MX spellings, including __fp8_e8m0, packed storage wrappers, tile_size, and Tr/Sr/vr constraint spellings
  • normalize exact 4096-byte Tr vectors to one canonical v1024i32 architectural TILE value before SelectionDAG decomposition
  • print pure Tr outputs as destination banks, rank-check sources, reject ambiguous read/write placeholders, and provide exact %Z SizeCode spelling
  • keep Sr handles compiler-local: local producer to consumer chains remain in one S register, while escaped or mismatched handles fail closed without inventing GPR to Shared copies
  • lower __builtin_linx_get_thread_idx to the canonical read-only PEID SSRGET 0x0802
  • resolve S8 contextually as DataType in BSTART.TLOAD and BSTART.TMATMUL while preserving s8 as a GPR

Verification

  • exact Release/assertions Linx build: clang, llc, llvm-mc, llvm-objdump, lld, clang-resource-headers
  • focused Clang, CodeGen, object/disassembly, and MC tests: 13/13 passed
  • full llvm/test/MC/LinxISA: 55/55 passed
  • object/disassembly covers FP32, FP16, integer, E8M0/MX carriers; Local SizeCodes 1, 6, 7, 10; Shared SizeCodes 11, 12; TLOAD to TADD to TSTORE; and same-S-register Sr producer to consumer flow
  • corrected TileOP integration lane confirms DynamicShape and TStoreShared O2 object/disassembly on this compiler

Integration note

TileOP PR #23 must use a fixed 4096-byte Linx carrier while retaining logical bytes and SizeCode as metadata. Its remaining MX optional-scale failure is TileOP-owned: absent optional operands are still represented by dummy Tr inputs, which violates queue consumption. No compiler workaround for that invalid operand model is included here.

The TileOP probes use the available musl plus libc++ headers under out/libc/musl/install/phase-b.

@zhoubot
zhoubot marked this pull request as ready for review August 22, 2026 23:32
@zhoubot
zhoubot merged commit b7c83f6 into main Aug 22, 2026
6 checks passed
@zhoubot
zhoubot deleted the codex/pto-isa-0.58.3-cxx-frontend branch August 22, 2026 23:32
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.

LinxISA: parse S8 data type contextually despite s8 GPR alias linx: package C++ Tile frontend ABI for PTO 0.58.3

1 participant