google / google/xls

Codegen always runs scheduling twice when pipelining

Open
#1,107 0 comments 0 reactions 0 assignees View on GitHub
enhancement scheduler
Dominant language
C++
Stars
1.9k
Forks
283
Avg merge
2d 10h
Merged PRs (30d)
135

Description

https://github.com/google/xls/blob/main/xls/scheduling/scheduling_pass_pipeline.cc

The compound pass for scheduling runs these sub-passes:
```
MutualExclusionPass
SimplificationPass
LiteralUncommoningPass
PipelineSchedulingPass
DeadCodeEliminationPass
MutualExclusionPass
DeadCodeEliminationPass
PipelineSchedulingPass
```
The second scheduling pass was added at commit 746c992be4d1429e374daa7e0fb0297e80138e0e with this comment:

> Mutual exclusion currently does not preserve the validity of the schedule,
since it adds nodes without specifying which cycle they go into. This change
causes mutual exclusion to erase the schedule, and adds a scheduling pass
after mutual exclusion in the scheduling pass pipeline.

The pipeline scheduling pass can potentially be runtime intensive, so if we can avoid rerunning it, that would help reduce runtime concerns.

FYI @ericastor

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.