Fix method calls to be a reorder barrier (#8222)

Signed-off-by: Matthew Ballance <[email protected]>
This commit is contained in:
Matthew Ballance
2026-08-25 13:09:14 -04:00
committed by GitHub
parent 821478070d
commit 0b85b80ece
4 changed files with 81 additions and 0 deletions
+9
View File
@@ -430,6 +430,15 @@ class ReorderVisitor final : public VNVisitor {
iterateChildren(nodep);
}
void visit(AstNodeCCall* nodep) override {
if (!m_graphp || m_noReorderWhy) return;
// The callee is not inlined, so the variables it reads and writes carry no VarRef at
// the call site, and the scoreboard would let assignments to them move across the
// call. Treat any such call as a barrier.
m_noReorderWhy = "CCall";
iterateChildren(nodep);
}
void visit(AstExprStmt* nodep) override {
if (!m_graphp || m_noReorderWhy) return;
VL_RESTORER(m_inDly);