mirror of https://github.com/llvm/circt.git
[FIRRTL][CheckCombLoops] Switch to the new pass checkCombLoops instead of checkCombCycles (#4513)
Switch to the new CheckCombLoops pass and add a flag `--use-old-check-comb-cycles` to switch to the old `CheckCombCycles` pass.
This commit is contained in:
parent
e6a9e3313a
commit
0cf02d2132
|
@ -304,6 +304,11 @@ static cl::opt<bool>
|
|||
cl::desc("Disable the CheckCombCycles pass"),
|
||||
cl::init(false), cl::Hidden, cl::cat(mainCategory));
|
||||
|
||||
static cl::opt<bool> useOldCheckCombCycles(
|
||||
"use-old-check-comb-cycles",
|
||||
cl::desc("Use old CheckCombCycles pass, that does not support aggregates"),
|
||||
cl::init(false), cl::Hidden, cl::cat(mainCategory));
|
||||
|
||||
static cl::opt<bool> disableIMDCE("disable-imdce",
|
||||
cl::desc("Disable the IMDCE pass"),
|
||||
cl::init(false), cl::Hidden,
|
||||
|
@ -692,14 +697,16 @@ static LogicalResult processBuffer(
|
|||
firrtl::createRandomizeRegisterInitPass());
|
||||
|
||||
if (!disableCheckCombCycles) {
|
||||
// TODO: Currently CheckCombCyles pass doesn't support aggregates so skip
|
||||
// the pass for now.
|
||||
if (preserveAggregate == firrtl::PreserveAggregate::None)
|
||||
pm.nest<firrtl::CircuitOp>().addPass(firrtl::createCheckCombCyclesPass());
|
||||
else
|
||||
emitWarning(module->getLoc())
|
||||
<< "CheckCombCyclesPass doens't support aggregate "
|
||||
"values yet so it is skipped\n";
|
||||
if (useOldCheckCombCycles) {
|
||||
if (preserveAggregate == firrtl::PreserveAggregate::None)
|
||||
pm.nest<firrtl::CircuitOp>().addPass(
|
||||
firrtl::createCheckCombCyclesPass());
|
||||
else
|
||||
emitWarning(module->getLoc())
|
||||
<< "CheckCombCyclesPass doens't support aggregate "
|
||||
"values yet so it is skipped\n";
|
||||
} else
|
||||
pm.nest<firrtl::CircuitOp>().addPass(firrtl::createCheckCombLoopsPass());
|
||||
}
|
||||
|
||||
// If we parsed a FIRRTL file and have optimizations enabled, clean it up.
|
||||
|
|
Loading…
Reference in New Issue