proc_clean: remove any empty cases if all cases use all-def compare.
This commit is contained in:
@@ -3793,6 +3793,11 @@ RTLIL::CaseRule::~CaseRule()
|
||||
delete *it;
|
||||
}
|
||||
|
||||
bool RTLIL::CaseRule::empty() const
|
||||
{
|
||||
return actions.empty() && switches.empty();
|
||||
}
|
||||
|
||||
RTLIL::CaseRule *RTLIL::CaseRule::clone() const
|
||||
{
|
||||
RTLIL::CaseRule *new_caserule = new RTLIL::CaseRule;
|
||||
@@ -3809,6 +3814,11 @@ RTLIL::SwitchRule::~SwitchRule()
|
||||
delete *it;
|
||||
}
|
||||
|
||||
bool RTLIL::SwitchRule::empty() const
|
||||
{
|
||||
return cases.empty();
|
||||
}
|
||||
|
||||
RTLIL::SwitchRule *RTLIL::SwitchRule::clone() const
|
||||
{
|
||||
RTLIL::SwitchRule *new_switchrule = new RTLIL::SwitchRule;
|
||||
|
||||
@@ -1227,6 +1227,8 @@ struct RTLIL::CaseRule
|
||||
~CaseRule();
|
||||
void optimize();
|
||||
|
||||
bool empty() const;
|
||||
|
||||
template<typename T> void rewrite_sigspecs(T &functor);
|
||||
RTLIL::CaseRule *clone() const;
|
||||
};
|
||||
@@ -1238,6 +1240,8 @@ struct RTLIL::SwitchRule : public RTLIL::AttrObject
|
||||
|
||||
~SwitchRule();
|
||||
|
||||
bool empty() const;
|
||||
|
||||
template<typename T> void rewrite_sigspecs(T &functor);
|
||||
RTLIL::SwitchRule *clone() const;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user