mirror of
https://github.com/verilator/verilator.git
synced 2025-01-06 06:37:45 +00:00
Internals: Remove unneeded pure checks. No functional change.
This commit is contained in:
parent
b5a6b34968
commit
411f563cbe
@ -1884,7 +1884,7 @@ private:
|
|||||||
AstNodeExpr* const ap = lhsp->lhsp()->unlinkFrBack();
|
AstNodeExpr* const ap = lhsp->lhsp()->unlinkFrBack();
|
||||||
AstNodeExpr* const bp = lhsp->rhsp()->unlinkFrBack();
|
AstNodeExpr* const bp = lhsp->rhsp()->unlinkFrBack();
|
||||||
AstNodeBiop* const shift1p = nodep;
|
AstNodeBiop* const shift1p = nodep;
|
||||||
AstNodeBiop* const shift2p = nodep->cloneTreePure(true);
|
AstNodeBiop* const shift2p = nodep->cloneTree(true);
|
||||||
shift1p->lhsp(ap);
|
shift1p->lhsp(ap);
|
||||||
shift1p->rhsp(shiftp->cloneTreePure(true));
|
shift1p->rhsp(shiftp->cloneTreePure(true));
|
||||||
shift2p->lhsp(bp);
|
shift2p->lhsp(bp);
|
||||||
|
@ -518,14 +518,14 @@ class TristateVisitor final : public TristateBaseVisitor {
|
|||||||
|
|
||||||
// Unlink lhsp before copying to save unnecessary copy of lhsp
|
// Unlink lhsp before copying to save unnecessary copy of lhsp
|
||||||
AstNodeExpr* const lhsp = extendp->lhsp()->unlinkFrBack();
|
AstNodeExpr* const lhsp = extendp->lhsp()->unlinkFrBack();
|
||||||
AstExtend* const enExtendp = extendp->cloneTreePure(false);
|
AstExtend* const enExtendp = extendp->cloneTree(false);
|
||||||
extendp->lhsp(lhsp);
|
extendp->lhsp(lhsp);
|
||||||
AstNodeExpr* const enLhsp = getEnExprBasedOnOriginalp(lhsp);
|
AstNodeExpr* const enLhsp = getEnExprBasedOnOriginalp(lhsp);
|
||||||
enExtendp->lhsp(new AstNot{enLhsp->fileline(), enLhsp});
|
enExtendp->lhsp(new AstNot{enLhsp->fileline(), enLhsp});
|
||||||
return new AstNot{enExtendp->fileline(), enExtendp};
|
return new AstNot{enExtendp->fileline(), enExtendp};
|
||||||
} else if (AstSel* const selp = VN_CAST(nodep, Sel)) {
|
} else if (AstSel* const selp = VN_CAST(nodep, Sel)) {
|
||||||
AstNodeExpr* const fromp = selp->fromp()->unlinkFrBack();
|
AstNodeExpr* const fromp = selp->fromp()->unlinkFrBack();
|
||||||
AstSel* const enSelp = selp->cloneTreePure(false);
|
AstSel* const enSelp = selp->cloneTree(false);
|
||||||
selp->fromp(fromp);
|
selp->fromp(fromp);
|
||||||
AstNodeExpr* const enFromp = getEnExprBasedOnOriginalp(fromp);
|
AstNodeExpr* const enFromp = getEnExprBasedOnOriginalp(fromp);
|
||||||
enSelp->fromp(enFromp);
|
enSelp->fromp(enFromp);
|
||||||
|
Loading…
Reference in New Issue
Block a user