Internals: clang-tidy cleanups. No functional change intended.
This commit is contained in:
parent
daac7cb90d
commit
12925cd8b0
|
|
@ -468,8 +468,10 @@ private:
|
|||
wantactivep->addStmtsp(nodep);
|
||||
|
||||
// Warn and convert any delayed assignments
|
||||
ActiveDlyVisitor{nodep,
|
||||
m_clockedProcess ? ActiveDlyVisitor::CT_SEQ : ActiveDlyVisitor::CT_COMB};
|
||||
{
|
||||
ActiveDlyVisitor{nodep, m_clockedProcess ? ActiveDlyVisitor::CT_SEQ
|
||||
: ActiveDlyVisitor::CT_COMB};
|
||||
}
|
||||
|
||||
// check combinational processes for latches
|
||||
if (!m_clockedProcess || kwd == VAlwaysKwd::ALWAYS_LATCH) {
|
||||
|
|
|
|||
|
|
@ -1224,7 +1224,7 @@ void V3Options::parseOptsList(FileLine* fl, const string& optdir, int argc, char
|
|||
}
|
||||
});
|
||||
DECL_OPTION("-o", Set, &m_exeName);
|
||||
DECL_OPTION("-order-clock-delay", CbOnOff, [fl](bool flag) {
|
||||
DECL_OPTION("-order-clock-delay", CbOnOff, [fl](bool /*flag*/) {
|
||||
fl->v3warn(DEPRECATED, "Option order-clock-delay is deprecated and has no effect.");
|
||||
});
|
||||
DECL_OPTION("-output-split", Set, &m_outputSplit);
|
||||
|
|
|
|||
|
|
@ -479,7 +479,7 @@ class OrderBuildVisitor final : public VNVisitor {
|
|||
virtual void visit(AstNode* nodep) override { iterateChildren(nodep); }
|
||||
|
||||
// CONSTRUCTOR
|
||||
OrderBuildVisitor(AstNetlist* nodep, const std::vector<V3Sched::LogicByScope*>& coll,
|
||||
OrderBuildVisitor(AstNetlist* /*nodep*/, const std::vector<V3Sched::LogicByScope*>& coll,
|
||||
const std::unordered_map<const AstSenItem*, const AstSenTree*>& trigToSen)
|
||||
: m_trigToSen{trigToSen} {
|
||||
|
||||
|
|
@ -1522,8 +1522,8 @@ AstCFunc* order(AstNetlist* netlistp, //
|
|||
// Order the code
|
||||
const std::unique_ptr<OrderGraph> graph
|
||||
= OrderBuildVisitor::process(netlistp, logic, trigToSen);
|
||||
const auto& nodeps = OrderProcess::main(netlistp, *graph.get(), trigToSen, tag, parallel, slow,
|
||||
externalDomains);
|
||||
const auto& nodeps
|
||||
= OrderProcess::main(netlistp, *graph, trigToSen, tag, parallel, slow, externalDomains);
|
||||
|
||||
// Create the result function
|
||||
AstScope* const scopeTopp = netlistp->topScopep()->scopep();
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ class AstVarScope;
|
|||
|
||||
namespace V3Sched {
|
||||
struct LogicByScope;
|
||||
};
|
||||
}; // namespace V3Sched
|
||||
|
||||
//============================================================================
|
||||
|
||||
|
|
|
|||
|
|
@ -140,9 +140,9 @@ public:
|
|||
AstVarScope* vscp() const { return m_vscp; }
|
||||
|
||||
// LCOV_EXCL_START // Debug code
|
||||
virtual string dotShape() const override final { return "ellipse"; }
|
||||
string dotShape() const override final { return "ellipse"; }
|
||||
virtual string nameSuffix() const = 0;
|
||||
virtual string name() const override final {
|
||||
string name() const override final {
|
||||
return cvtToHex(m_vscp) + " " + nameSuffix() + "\\n " + m_vscp->name();
|
||||
}
|
||||
// LCOV_EXCL_STOP
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ AstCFunc* makeTopFunction(AstNetlist* netlistp, const string& name, bool slow) {
|
|||
return funcp;
|
||||
}
|
||||
|
||||
std::vector<const AstSenTree*> getSenTreesUsedBy(std::vector<const LogicByScope*> lbsps) {
|
||||
std::vector<const AstSenTree*> getSenTreesUsedBy(const std::vector<const LogicByScope*>& lbsps) {
|
||||
const VNUser1InUse user1InUse;
|
||||
std::vector<const AstSenTree*> result;
|
||||
for (const LogicByScope* const lbsp : lbsps) {
|
||||
|
|
@ -106,8 +106,9 @@ void remapSensitivities(LogicByScope& lbs,
|
|||
}
|
||||
}
|
||||
|
||||
void invertAndMergeSenTreeMap(std::unordered_map<const AstSenItem*, const AstSenTree*>& result,
|
||||
std::unordered_map<const AstSenTree*, AstSenTree*> senTreeMap) {
|
||||
void invertAndMergeSenTreeMap(
|
||||
std::unordered_map<const AstSenItem*, const AstSenTree*>& result,
|
||||
const std::unordered_map<const AstSenTree*, AstSenTree*>& senTreeMap) {
|
||||
for (const auto& pair : senTreeMap) {
|
||||
UASSERT_OBJ(!pair.second->sensesp()->nextp(), pair.second, "Should be single AstSenIem");
|
||||
result.emplace(pair.second->sensesp(), pair.first);
|
||||
|
|
@ -417,7 +418,7 @@ struct TriggerKit {
|
|||
VL_UNCOPYABLE(TriggerKit);
|
||||
|
||||
// Utility that assigns the given index trigger to fire when the given variable is zero
|
||||
void addFirstIterationTriggerAssignment(AstVarScope* counterp, uint32_t index) const {
|
||||
void addFirstIterationTriggerAssignment(AstVarScope* counterp, uint32_t /*index*/) const {
|
||||
FileLine* const flp = counterp->fileline();
|
||||
AstVarRef* const vrefp = new AstVarRef{flp, m_vscp, VAccess::WRITE};
|
||||
AstCMethodHard* const callp = new AstCMethodHard{flp, vrefp, "at", new AstConst{flp, 0}};
|
||||
|
|
@ -480,8 +481,9 @@ public:
|
|||
// Create a TRIGGERVEC and the related TriggerKit for the given AstSenTree vector
|
||||
|
||||
const TriggerKit createTriggers(AstNetlist* netlistp, SenExprBuilder& senExprBuilder,
|
||||
std::vector<const AstSenTree*> senTreeps, const string& name,
|
||||
const ExtraTriggers& extraTriggers, bool slow = false) {
|
||||
const std::vector<const AstSenTree*>& senTreeps,
|
||||
const string& name, const ExtraTriggers& extraTriggers,
|
||||
bool slow = false) {
|
||||
AstTopScope* const topScopep = netlistp->topScopep();
|
||||
AstScope* const scopeTopp = topScopep->scopep();
|
||||
FileLine* const flp = scopeTopp->fileline();
|
||||
|
|
@ -610,7 +612,7 @@ const TriggerKit createTriggers(AstNetlist* netlistp, SenExprBuilder& senExprBui
|
|||
// Helpers to construct an evaluation loop.
|
||||
|
||||
AstNode* buildLoop(AstNetlist* netlistp, const string& name,
|
||||
std::function<void(AstVarScope*, AstWhile*)> build) //
|
||||
const std::function<void(AstVarScope*, AstWhile*)>& build) //
|
||||
{
|
||||
AstTopScope* const topScopep = netlistp->topScopep();
|
||||
AstScope* const scopeTopp = topScopep->scopep();
|
||||
|
|
@ -941,7 +943,7 @@ void createEval(AstNetlist* netlistp, //
|
|||
// Top level entry-point to scheduling
|
||||
|
||||
void schedule(AstNetlist* netlistp) {
|
||||
const auto addSizeStat = [](const string name, const LogicByScope& lbs) {
|
||||
const auto addSizeStat = [](const string& name, const LogicByScope& lbs) {
|
||||
uint64_t size = 0;
|
||||
lbs.foreachLogic([&](AstNode* nodep) { size += nodep->nodeCount(); });
|
||||
V3Stats::addStat("Scheduling, " + name, size);
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ struct LogicByScope final : public std::vector<std::pair<AstScope*, AstActive*>>
|
|||
clear();
|
||||
};
|
||||
|
||||
void foreachLogic(std::function<void(AstNode*)> f) const {
|
||||
void foreachLogic(const std::function<void(AstNode*)>& f) const {
|
||||
for (const auto& pair : *this) {
|
||||
for (AstNode* nodep = pair.second->stmtsp(); nodep; nodep = nodep->nextp()) f(nodep);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ public:
|
|||
};
|
||||
|
||||
class Graph final : public V3Graph {
|
||||
void loopsVertexCb(V3GraphVertex* vtxp) {
|
||||
void loopsVertexCb(V3GraphVertex* vtxp) override {
|
||||
// TODO: 'typeName' is an internal thing. This should be more human readable.
|
||||
if (LogicVertex* const lvtxp = dynamic_cast<LogicVertex*>(vtxp)) {
|
||||
AstNode* const logicp = lvtxp->logicp();
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ class Vertex VL_NOT_FINAL : public V3GraphVertex {
|
|||
RegionFlags m_drivingRegions{NONE}; // The regions driving this vertex
|
||||
|
||||
public:
|
||||
Vertex(V3Graph* graphp)
|
||||
explicit Vertex(V3Graph* graphp)
|
||||
: V3GraphVertex{graphp} {}
|
||||
uint8_t drivingRegions() const { return m_drivingRegions; }
|
||||
void addDrivingRegions(uint8_t regions) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue