Skip to content

Watch branching and conditional-control-flow decisions across targets #76

Description

@isomorphisms

Purpose

Keep one cross-repository observation surface for the current Idriç branching + conditionals + bounded control flow work without turning every application example into a separate target.

ARMv7 Thumb-2 remains the proving ground. Function calls are not part of this milestone. The watch is concerned with comparisons, two-way branches, finite dispatch, bounded loops/backedges, early exit, and nested control flow.

Primary compiler contract: dilapidated-shed/Idric#72
ARM sequencing authority: dilapidated-shed/idric-arm-thumb#31
Fleet compatibility: #7
CPU mutatis-mutandis propagation: #20 / draft PR #22
Shader-specific propagation: #21 / draft PR #23
DEX-vs-physical comparison: #41

Primary watched workload families

The first-class corpus is intentionally small:

  1. XML / tokenizer dispatch

    • finite tokenizer states and input classes;
    • branch chains vs tables/state machines;
    • structural-byte scans and bounded loops.
  2. Document-tree / selector traversal

    • child/sibling/ancestor/descendant walks;
    • finite predicates;
    • nested traversal and early exit.
  3. Fixed-string / exact-byte search

    • one portable search oracle;
    • ordinary scalar branches, packed state, table-driven forms, and later SIMD are alternative lowerings rather than separate semantics.
  4. Unicode operator dispatch

    • UTF-8/scalar/token boundary;
    • staged finite dispatch for operators such as ≤, ≥, ≠, ≟, ←, →.
  5. Paint / display-list dispatch

    • compact finite paint-command tags;
    • branch/table dispatch at the front;
    • increasingly regular numeric/memory work after dispatch.

These five families should be enough to pressure comparisons, two-way conditionals, finite case, bounded loops/backedges, early exits, nesting, and several different dispatch densities.

Main repository ownership

isomorphisms/Idric

Watch target-independent branching semantics and structure preservation:

isomorphisms/idric-arm-thumb

Watch the native proving ground:

isomorphisms/ib

Watch portable browser oracles:

walnut-burgundy/computer-science

Use this mainly as the decision journal / algorithm comparison source, especially #23/#24, #29, #35/#36, #42, and #58.

CPU followers: mutatis mutandis, not copy-the-Thumb-code

Use #20 / draft PR #22 for x86-64, AArch64, RISC-V, Wasm, DEX/ART and later CPU/virtual targets.

The working intuition that Thumb is a cramped alleyway and some followers are superhighways is useful only as a hypothesis. It must not become a baked-in monotonicity assumption. More registers, wider encodings, conditional select, or different branch machinery may help on some followers; another target may make the same source decision worse, illegal, or structurally different.

For every reviewed ARM branching change classify follower consequences as:

  • apply
  • adapt
  • already-covered
  • not-applicable
  • defer-measurement

Propagate semantic contracts, reusable fixtures/oracles, compiler seams, and verification methods. Do not propagate Thumb flags, ABI, layout, encodings, or branch tricks as universal rules.

Fragment-shader implication check

Shaders are not CPU followers, but branching decisions may expose shared semantic distinctions that the fragment-shader backend should reconsider.

Use #21 / draft PR #23 to ask, when relevant:

  • does the shader IR preserve the same semantic choice/finite dispatch/bounded iteration distinction?
  • would actual branching diverge lanes/quads?
  • would masks/selects be better than branch control flow?
  • do uniformity or derivative rules constrain the transformation?
  • does discard/early-fragment termination change legality or behavior?
  • do PowerVR, Maxwell, and WGSL/driver compilers make materially different choices?

The result may be adapt, already-covered, not-applicable, or defer-measurement; never translate an ARM branch sequence instruction-for-instruction into a fragment shader.

Secondary examples are not separate targets

Mailbox parsing, Field Mouse, bioawk/genomics, and other applications may remain useful secondary fixtures, baselines, or stress tests. They do not enlarge the primary corpus unless they expose a materially different control-flow/representation problem.

Evidence layers

Keep these independent:

  1. exact semantic oracle;
  2. checked one-step-at-a-time compiler form;
  3. target lowering / assembly / object / shader / bytecode;
  4. emulator/host execution where meaningful;
  5. real target execution where available;
  6. follower review outcome.

Use PASS / FAIL / SKIP / NOT_VERIFIED honestly.

Decision-impact check

When a branching/control-flow choice changes, report:

If none of the five primary families is affected and no new cross-target semantic distinction is exposed, do not create additional work merely for completeness.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions