mirror of
https://github.com/verilator/verilator.git
synced 2026-09-03 03:03:01 +02:00
Internals: Use runtime type info instead of dynamic_cast for faster graph type checks (#4397)
This commit is contained in:
@@ -32,6 +32,7 @@ VL_DEFINE_DEBUG_FUNCTIONS;
|
||||
// Break the minimal number of backward edges to make the graph acyclic
|
||||
|
||||
class GraphAcycVertex final : public V3GraphVertex {
|
||||
VL_RTTI_IMPL(GraphAcycVertex, V3GraphVertex)
|
||||
// user() is used for various sub-algorithm pieces
|
||||
V3GraphVertex* const m_origVertexp; // Pointer to first vertex this represents
|
||||
protected:
|
||||
@@ -56,6 +57,7 @@ public:
|
||||
//--------------------------------------------------------------------
|
||||
|
||||
class GraphAcycEdge final : public V3GraphEdge {
|
||||
VL_RTTI_IMPL(GraphAcycEdge, V3GraphEdge)
|
||||
// userp() is always used to point to the head original graph edge
|
||||
private:
|
||||
using OrigEdgeList = std::list<V3GraphEdge*>; // List of orig edges, see also GraphAcyc's decl
|
||||
|
||||
Reference in New Issue
Block a user