Skip to content

Commit

Permalink
Add a StaticSchedule Analysis (#2033)
Browse files Browse the repository at this point in the history
* started refactoring

* no error messages

* mostly working

* I think it's working but code is messy

* I think correct

* no warnings'

* code cleaning

* rewrote some tests, cleaned some code

* rewrite tests

* clippy

* works for static interface now

* refactored code

* debugging

* bug fix

* cleaner code

* some documentation/cleaning

* last minute docs

* add test case

* documentation

* even more abstraction/refactorign

* clippy

* only expect binary encoding

* refactor

* _OneHot

* cleaner code

* fixed bug

* even cleaner code

* clippy

* more refactoring

* remove static_component_interface jazz

* more cleaning

* simplification

* remove static_component_interface

* all fields private

* minor documentation

* more appropriate function name

* clarifying documentation

* modified test case

* add documentation
  • Loading branch information
calebmkim authored May 3, 2024
1 parent 8a019ab commit 7f42a02
Show file tree
Hide file tree
Showing 21 changed files with 1,078 additions and 811 deletions.
2 changes: 2 additions & 0 deletions calyx-opt/src/analysis/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ mod read_write_set;
mod schedule_conflicts;
mod share_set;
mod static_par_timing;
mod static_schedule;
mod variable_detection;

pub use compaction_analysis::CompactionAnalysis;
Expand All @@ -42,4 +43,5 @@ pub use read_write_set::{AssignmentAnalysis, ReadWriteSet};
pub use schedule_conflicts::ScheduleConflicts;
pub use share_set::ShareSet;
pub use static_par_timing::StaticParTiming;
pub use static_schedule::{StaticFSM, StaticSchedule};
pub use variable_detection::VariableDetection;
428 changes: 428 additions & 0 deletions calyx-opt/src/analysis/static_schedule.rs

Large diffs are not rendered by default.

8 changes: 3 additions & 5 deletions calyx-opt/src/default_passes.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
//! Defines the default passes available to [PassManager].
use crate::passes::{
AddGuard, Canonicalize, CellShare, ClkInsertion, CollapseControl, CombProp,
CompileInvoke, CompileRepeat, CompileStatic, CompileStaticInterface,
CompileSync, CompileSyncWithoutSyncReg, ComponentInliner, DataPathInfer,
CompileInvoke, CompileRepeat, CompileStatic, CompileSync,
CompileSyncWithoutSyncReg, ComponentInliner, DataPathInfer,
DeadAssignmentRemoval, DeadCellRemoval, DeadGroupRemoval, DefaultAssigns,
DiscoverExternal, ExternalToRef, Externalize, GoInsertion, GroupToInvoke,
GroupToSeq, HoleInliner, InferShare, LowerGuards, MergeAssign, Papercut,
Expand Down Expand Up @@ -50,7 +50,6 @@ impl PassManager {
pm.register_pass::<CompileSync>()?;
pm.register_pass::<CompileSyncWithoutSyncReg>()?;
pm.register_pass::<AddGuard>()?;
pm.register_pass::<CompileStaticInterface>()?;

// Lowering passes
pm.register_pass::<GoInsertion>()?;
Expand Down Expand Up @@ -110,9 +109,8 @@ impl PassManager {
DeadGroupRemoval, // Static inliner generates lots of dead groups
SimplifyStaticGuards,
AddGuard,
CompileStaticInterface,
DeadGroupRemoval,
CompileStatic,
DeadGroupRemoval,
TopDownCompileControl
]
);
Expand Down
Loading

0 comments on commit 7f42a02

Please sign in to comment.