Skip to content

Conversation

@QinYuan2000
Copy link
Collaborator

Motivation

The previous FTD implementation handled loops by splitting them into four distinct scenarios.
When a single data delivery simultaneously matched multiple scenarios, or when deliveries appeared inside nested loops, the pass inserted multiple cond_br to realize suppression.
This increased circuit area and control complexity, making behavior hard to reason about.

This PR focuses purely on simplification: each data delivery is guarded by exactly one suppression branch.
We adopt a unified handling that does not require classifying loop scenarios into four cases and does not stack multiple branches for overlapping situations.

Implementation

  • Added local control dependence extraction between producer and consumer blocks, via a region-level subgraph with a virtual sink node.
    If the producer is traversed again, it is treated as the sink.
  • In this subgraph, any loop scenario is flattened into a direct suppression path without nested loop handling.
    All such cases are managed through one unified suppression path.
  • For any producer → consumer delivery, compute a single Boolean expression for suppression and insert one cond_br at the delivery site.
  • For MUX conditions (see FTD paper), only consider MUX conditions that appear after the producer.

@QinYuan2000 QinYuan2000 marked this pull request as draft October 15, 2025 23:49
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