Internals: Favor std::array. No functional change intended.
This commit is contained in:
parent
2287d420ee
commit
e995646898
|
|
@ -35,7 +35,7 @@ struct GraphPCNode final {
|
||||||
//
|
//
|
||||||
// Unlike the LogicMTasks's, we have no cost info for the generic graph
|
// Unlike the LogicMTasks's, we have no cost info for the generic graph
|
||||||
// accepted by GraphPathChecker, so assume each node has unit cost.
|
// accepted by GraphPathChecker, so assume each node has unit cost.
|
||||||
std::array<uint32_t, GraphWay::NUM_WAYS> m_cp;
|
std::array<uint32_t, GraphWay::NUM_WAYS> m_cp = {};
|
||||||
|
|
||||||
// Detect if we've seen this node before in a given recursive
|
// Detect if we've seen this node before in a given recursive
|
||||||
// operation. We'll use this in pathExistsInternal() to avoid checking
|
// operation. We'll use this in pathExistsInternal() to avoid checking
|
||||||
|
|
@ -44,9 +44,7 @@ struct GraphPCNode final {
|
||||||
uint64_t m_seenAtGeneration = 0;
|
uint64_t m_seenAtGeneration = 0;
|
||||||
|
|
||||||
// CONSTRUCTORS
|
// CONSTRUCTORS
|
||||||
GraphPCNode() {
|
GraphPCNode() {}
|
||||||
for (unsigned int& w : m_cp) w = 0;
|
|
||||||
}
|
|
||||||
~GraphPCNode() = default;
|
~GraphPCNode() = default;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -332,7 +332,7 @@ private:
|
||||||
// Cost of critical paths going FORWARD from graph-start to the start
|
// Cost of critical paths going FORWARD from graph-start to the start
|
||||||
// of this vertex, and also going REVERSE from the end of the graph to
|
// of this vertex, and also going REVERSE from the end of the graph to
|
||||||
// the end of the vertex. Same units as m_cost.
|
// the end of the vertex. Same units as m_cost.
|
||||||
std::array<uint64_t, GraphWay::NUM_WAYS> m_critPathCost;
|
std::array<uint64_t, GraphWay::NUM_WAYS> m_critPathCost = {};
|
||||||
|
|
||||||
const uint32_t m_id; // Unique LogicMTask ID number
|
const uint32_t m_id; // Unique LogicMTask ID number
|
||||||
static uint32_t s_nextId; // Next ID number to use
|
static uint32_t s_nextId; // Next ID number to use
|
||||||
|
|
@ -361,7 +361,6 @@ public:
|
||||||
: V3GraphVertex{graphp}
|
: V3GraphVertex{graphp}
|
||||||
, m_id{s_nextId++} {
|
, m_id{s_nextId++} {
|
||||||
UASSERT(s_nextId < 0xFFFFFFFFUL, "Too many mTaskGraphp");
|
UASSERT(s_nextId < 0xFFFFFFFFUL, "Too many mTaskGraphp");
|
||||||
for (uint64_t& item : m_critPathCost) item = 0;
|
|
||||||
if (mVtxp) {
|
if (mVtxp) {
|
||||||
m_mVertices.linkBack(mVtxp);
|
m_mVertices.linkBack(mVtxp);
|
||||||
if (const OrderLogicVertex* const olvp = mVtxp->logicp()) {
|
if (const OrderLogicVertex* const olvp = mVtxp->logicp()) {
|
||||||
|
|
|
||||||
|
|
@ -34,11 +34,11 @@ V3Mutex V3Stats::s_mutex;
|
||||||
class StatsVisitor final : public VNVisitorConst {
|
class StatsVisitor final : public VNVisitorConst {
|
||||||
struct Counters final {
|
struct Counters final {
|
||||||
// Nodes of given type
|
// Nodes of given type
|
||||||
uint64_t m_statTypeCount[VNType::_ENUM_END];
|
std::array<uint64_t, VNType::_ENUM_END> m_statTypeCount = {};
|
||||||
// Nodes of given type with given type immediate child
|
// Nodes of given type with given type immediate child
|
||||||
uint64_t m_statAbove[VNType::_ENUM_END][VNType::_ENUM_END];
|
std::array<std::array<uint64_t, VNType::_ENUM_END>, VNType::_ENUM_END> m_statAbove = {};
|
||||||
// Prediction of given type
|
// Prediction of given type
|
||||||
uint64_t m_statPred[VBranchPred::_ENUM_END];
|
std::array<uint64_t, VBranchPred::_ENUM_END> m_statPred = {};
|
||||||
};
|
};
|
||||||
|
|
||||||
// STATE
|
// STATE
|
||||||
|
|
@ -103,9 +103,6 @@ public:
|
||||||
: m_fastOnly{fastOnly}
|
: m_fastOnly{fastOnly}
|
||||||
, m_accump{fastOnly ? &m_dumpster : &m_counters} {
|
, m_accump{fastOnly ? &m_dumpster : &m_counters} {
|
||||||
UINFO(9, "Starting stats, fastOnly=" << fastOnly);
|
UINFO(9, "Starting stats, fastOnly=" << fastOnly);
|
||||||
memset(&m_counters, 0, sizeof(m_counters));
|
|
||||||
memset(&m_dumpster, 0, sizeof(m_dumpster));
|
|
||||||
|
|
||||||
iterateConst(nodep);
|
iterateConst(nodep);
|
||||||
|
|
||||||
// Shorthand
|
// Shorthand
|
||||||
|
|
|
||||||
|
|
@ -293,7 +293,7 @@ class UndrivenVisitor final : public VNVisitorConst {
|
||||||
const VNUser2InUse m_inuser2;
|
const VNUser2InUse m_inuser2;
|
||||||
|
|
||||||
// STATE
|
// STATE
|
||||||
std::array<std::vector<UndrivenVarEntry*>, 3> m_entryps; // Nodes to delete when finished
|
std::array<std::vector<UndrivenVarEntry*>, 3> m_entryps = {}; // Nodes to delete when finished
|
||||||
bool m_inBBox = false; // In black box; mark as driven+used
|
bool m_inBBox = false; // In black box; mark as driven+used
|
||||||
bool m_inContAssign = false; // In continuous assignment
|
bool m_inContAssign = false; // In continuous assignment
|
||||||
bool m_inInitialStatic = false; // In InitialStatic
|
bool m_inInitialStatic = false; // In InitialStatic
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue