The Grand Central (lib/Dialect/FIRRTL/Transforms/GrandCentral.cpp), Grand Central Taps (lib/Dialect/FIRRTL/Transforms/GrandCentralTaps.cpp), and Grand Central Signal Mappings (lib/Dialect/FIRRTL/Transforms/GrandCentralSignalMappings.cpp) have been reported as running slow on large designs (with duplicated modules). Investigate what's going on here and fix it.
Some ideas:
(@fabianschuiki states) that this may just be stemming from the lack of deduplication, so this is the expected scaling we get.
(@Ramlakshmi3733 suggests) exploring parallelizing these passes. There may be some issues here as the passes are mostly just a two-phase process of collecting information during a global walk, then adding IR constructs. The collect information phase could be parallelized (with workers competing to write to a global data store?).
Combine all these passes.
Promote Grand Central information collection to an analysis then remove Grand Central annotations during LowerToHW.
(@fabianschuiki suggests) leaving breadcrumbs on the FIRRTL modules during scattering indicating that they have no GCT-related information. This would speed up the walk by avoiding modules that will not contribute to a GCT construct. (EmitSignalMappings already works this way.)
The Grand Central (
lib/Dialect/FIRRTL/Transforms/GrandCentral.cpp
), Grand Central Taps (lib/Dialect/FIRRTL/Transforms/GrandCentralTaps.cpp
), and Grand Central Signal Mappings (lib/Dialect/FIRRTL/Transforms/GrandCentralSignalMappings.cpp
) have been reported as running slow on large designs (with duplicated modules). Investigate what's going on here and fix it.Some ideas:
LowerToHW
.