IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /max/get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /max/get-started.md).

Mojo function

apply_edge_rules

apply_edge_rules(body: List[OpDesc], config: PipelineConfig, rules: List[EdgeRule]) -> List[DepEdge]

Apply declarative edge rules to a loop body, producing DepEdge list.

Pre-classifies ops by role, ordinal, half, and loop-carried status, then evaluates each rule against all (producer, consumer) pairs that match the rule's role requirements. This is the generic evaluator that replaces the hand-coded 4-phase and 8-rule logic in derive_edges_from_ops.

Returns:

List[DepEdge]