Remove unused code. No functional change.

This commit is contained in:
Geza Lore 2021-11-07 14:09:36 +00:00
parent b08c694cd6
commit 987ce927eb
8 changed files with 4 additions and 65 deletions

View File

@ -517,9 +517,6 @@ public:
return (m_e == BIT || m_e == BYTE || m_e == INT || m_e == INTEGER || m_e == LOGIC
|| m_e == LONGINT || m_e == SHORTINT || m_e == UINT32 || m_e == UINT64);
}
bool isSloppy() const { // Don't be as anal about width warnings
return !(m_e == LOGIC || m_e == BIT);
}
bool isBitLogic() const { // Bit/logic vector types; can form a packed array
return (m_e == LOGIC || m_e == BIT);
}
@ -1029,9 +1026,6 @@ public:
int hiMaxSelect() const {
return (lo() < 0 ? hi() - lo() : hi());
} // Maximum value a [] select may index
bool representableByWidth() const { // Could be represented by just width=1, or [width-1:0]
return (!m_ranged || (m_right == 0 && m_left >= 1));
}
void dump(std::ostream& str) const {
if (ranged()) {
str << "[" << left() << ":" << right() << "]";
@ -2879,7 +2873,6 @@ public:
return m_taskp && m_taskp->isGateOptimizable();
}
string dotted() const { return m_dotted; } // * = Scope name or ""
string prettyDotted() const { return prettyName(dotted()); }
string inlinedDots() const { return m_inlinedDots; }
void inlinedDots(const string& flag) { m_inlinedDots = flag; }
AstNodeFTask* taskp() const { return m_taskp; } // [After Link] Pointer to variable
@ -2918,7 +2911,6 @@ private:
bool m_recursive : 1; // Recursive module
bool m_recursiveClone : 1; // If recursive, what module it clones, otherwise nullptr
int m_level = 0; // 1=top module, 2=cell off top module, ...
int m_typeNum = 0; // Incrementing implicit type number
VLifetime m_lifetime; // Lifetime
VTimescale m_timeunit; // Global time unit
VOptionBool m_unconnectedDrive; // State of `unconnected_drive
@ -2958,7 +2950,6 @@ public:
void level(int level) { m_level = level; }
int level() const { return m_level; }
bool isTop() const { return level() == 1; }
int typeNumGetInc() { return ++m_typeNum; }
void modPublic(bool flag) { m_modPublic = flag; }
bool modPublic() const { return m_modPublic; }
void modTrace(bool flag) { m_modTrace = flag; }

View File

@ -197,30 +197,6 @@ AstNodeBiop* AstEq::newTyped(FileLine* fl, AstNode* lhsp, AstNode* rhsp) {
}
}
AstNodeBiop* AstGte::newTyped(FileLine* fl, AstNode* lhsp, AstNode* rhsp) {
if (lhsp->isString() && rhsp->isString()) {
return new AstGteN(fl, lhsp, rhsp);
} else if (lhsp->isDouble() && rhsp->isDouble()) {
return new AstGteD(fl, lhsp, rhsp);
} else if (lhsp->isSigned() && rhsp->isSigned()) {
return new AstGteS(fl, lhsp, rhsp);
} else {
return new AstGte(fl, lhsp, rhsp);
}
}
AstNodeBiop* AstLte::newTyped(FileLine* fl, AstNode* lhsp, AstNode* rhsp) {
if (lhsp->isString() && rhsp->isString()) {
return new AstLteN(fl, lhsp, rhsp);
} else if (lhsp->isDouble() && rhsp->isDouble()) {
return new AstLteD(fl, lhsp, rhsp);
} else if (lhsp->isSigned() && rhsp->isSigned()) {
return new AstLteS(fl, lhsp, rhsp);
} else {
return new AstLte(fl, lhsp, rhsp);
}
}
AstNodeBiop* AstEqWild::newTyped(FileLine* fl, AstNode* lhsp, AstNode* rhsp) {
if (lhsp->isString() && rhsp->isString()) {
return new AstEqN(fl, lhsp, rhsp);

View File

@ -365,7 +365,6 @@ public:
AstNodeDType* childDTypep() const { return VN_AS(op1p(), NodeDType); }
void childDTypep(AstNodeDType* nodep) { setOp1p(nodep); }
AstNode* classOrPkgsp() const { return op2p(); }
void classOrPkgsp(AstNode* nodep) { setOp2p(nodep); }
AstClass* classp() const; // Class being extended (after link)
};
@ -917,7 +916,6 @@ public:
bool isEventValue() const { return keyword().isEventValue(); }
bool isOpaque() const { return keyword().isOpaque(); }
bool isString() const { return keyword().isString(); }
bool isSloppy() const { return keyword().isSloppy(); }
bool isZeroInit() const { return keyword().isZeroInit(); }
bool isRanged() const { return rangep() || m.m_nrange.ranged(); }
bool isDpiBitVec() const { // DPI uses svBitVecVal
@ -1096,7 +1094,6 @@ public:
string ifaceName() const { return m_ifaceName; }
void ifaceName(const string& name) { m_ifaceName = name; }
string modportName() const { return m_modportName; }
void modportName(const string& name) { m_modportName = name; }
AstIface* ifaceViaCellp() const; // Use cellp or ifacep
AstIface* ifacep() const { return m_ifacep; }
void ifacep(AstIface* nodep) { m_ifacep = nodep; }
@ -2464,7 +2461,6 @@ public:
virtual void dump(std::ostream& str) const override;
string dotted() const { return m_dotted; }
void dotted(const string& dotted) { m_dotted = dotted; }
string prettyDotted() const { return prettyName(dotted()); }
string inlinedDots() const { return m_inlinedDots; }
void inlinedDots(const string& flag) { m_inlinedDots = flag; }
virtual string emitVerilog() override { V3ERROR_NA_RETURN(""); }
@ -3783,8 +3779,6 @@ class AstCaseItem final : public AstNode {
// Parents: CASE
// condsp Children: MATH (Null condition used for default block)
// bodysp Children: Statements
private:
bool m_ignoreOverlap = false; // Default created by assertions; ignore overlaps
public:
AstCaseItem(FileLine* fl, AstNode* condsp, AstNode* bodysp)
: ASTGEN_SUPER_CaseItem(fl) {
@ -3798,8 +3792,6 @@ public:
void condsp(AstNode* nodep) { setOp1p(nodep); }
void addBodysp(AstNode* newp) { addOp2p(newp); }
bool isDefault() const { return condsp() == nullptr; }
bool ignoreOverlap() const { return m_ignoreOverlap; }
void ignoreOverlap(bool flag) { m_ignoreOverlap = flag; }
};
class AstSFormatF final : public AstNode {
@ -4760,20 +4752,16 @@ public:
class AstChangeDet final : public AstNodeStmt {
// A comparison to determine change detection, common & must be fast.
private:
bool m_clockReq; // Type of detection
public:
// Null lhs+rhs used to indicate change needed with no spec vars
AstChangeDet(FileLine* fl, AstNode* lhsp, AstNode* rhsp, bool clockReq)
AstChangeDet(FileLine* fl, AstNode* lhsp, AstNode* rhsp)
: ASTGEN_SUPER_ChangeDet(fl) {
setNOp1p(lhsp);
setNOp2p(rhsp);
m_clockReq = clockReq;
}
ASTNODE_NODE_FUNCS(ChangeDet)
AstNode* lhsp() const { return op1p(); }
AstNode* rhsp() const { return op2p(); }
bool isClockReq() const { return m_clockReq; }
virtual bool isGateOptimizable() const override { return false; }
virtual bool isPredictOptimizable() const override { return false; }
virtual int instrCount() const override { return widthInstrs() * 2; } // xor, or/logor
@ -7076,8 +7064,6 @@ public:
virtual AstNode* cloneType(AstNode* lhsp, AstNode* rhsp) override {
return new AstGte(this->fileline(), lhsp, rhsp);
}
static AstNodeBiop* newTyped(FileLine* fl, AstNode* lhsp,
AstNode* rhsp); // Return AstGte/AstGteS/AstGteD
virtual void numberOperate(V3Number& out, const V3Number& lhs, const V3Number& rhs) override {
out.opGte(lhs, rhs);
}
@ -7171,8 +7157,6 @@ public:
virtual AstNode* cloneType(AstNode* lhsp, AstNode* rhsp) override {
return new AstLte(this->fileline(), lhsp, rhsp);
}
static AstNodeBiop* newTyped(FileLine* fl, AstNode* lhsp,
AstNode* rhsp); // Return AstLte/AstLteS/AstLteD
virtual void numberOperate(V3Number& out, const V3Number& lhs, const V3Number& rhs) override {
out.opLte(lhs, rhs);
}
@ -9222,7 +9206,6 @@ public:
void addModulep(AstNodeModule* modulep) { addOp1p(modulep); }
AstNodeFile* filesp() const { return VN_AS(op2p(), NodeFile); } // op2 = List of files
void addFilesp(AstNodeFile* filep) { addOp2p(filep); }
AstNode* miscsp() const { return op3p(); } // op3 = List of dtypes etc
void addMiscsp(AstNode* nodep) { addOp3p(nodep); }
AstTypeTable* typeTablep() { return m_typeTablep; }
void changeRequest(bool specified) { m_changeRequest = specified; }

View File

@ -190,7 +190,7 @@ private:
if (!m_valueItem[i]) {
m_valueItem[i] = itemp;
foundHit = true;
} else if (!foundOverlap && !itemp->ignoreOverlap()) {
} else if (!foundOverlap) {
firstOverlap = i;
foundOverlap = true;
m_caseNoOverlapsAllCovered = false;

View File

@ -71,7 +71,7 @@ public:
// Each change detection function needs at least one AstChangeDet
// to ensure that V3EmitC outputs the necessary code.
maybeCreateMidChg();
m_chgFuncp->addStmtsp(new AstChangeDet{m_scopetopp->fileline(), nullptr, nullptr, false});
m_chgFuncp->addStmtsp(new AstChangeDet{m_scopetopp->fileline(), nullptr, nullptr});
}
void maybeCreateMidChg() {
// Don't create an extra function call if splitting is disabled
@ -146,7 +146,7 @@ private:
m_statep->maybeCreateChgFuncp();
AstChangeDet* const changep = new AstChangeDet{
m_vscp->fileline(), m_varEqnp->cloneTree(true), m_newRvEqnp->cloneTree(true), false};
m_vscp->fileline(), m_varEqnp->cloneTree(true), m_newRvEqnp->cloneTree(true)};
m_statep->m_chgFuncp->addStmtsp(changep);
AstAssign* const initp = new AstAssign{m_vscp->fileline(), m_newLvEqnp->cloneTree(true),
m_varEqnp->cloneTree(true)};

View File

@ -88,10 +88,6 @@ protected:
friend class V3GraphEdge;
friend class GraphAcyc;
// METHODS
void acyclicDFS();
void acyclicDFSIterate(V3GraphVertex* vertexp, int depth, uint32_t currentRank);
void acyclicCut();
void acyclicLoop(V3GraphVertex* vertexp, int depth);
double orderDFSIterate(V3GraphVertex* vertexp);
void dumpEdge(std::ostream& os, V3GraphVertex* vertexp, V3GraphEdge* edgep);
void verticesUnlink() { m_vertices.reset(); }

View File

@ -28,9 +28,6 @@
class V3LinkInc final {
public:
static void linkIncrements(AstNetlist* nodep);
private:
void prepost_visit(AstNode* nodep);
};
#endif // Guard

View File

@ -359,12 +359,8 @@ public:
// STATICS
static int log2b(uint32_t num);
using UniopFuncp = V3Number& (*)(V3Number&);
using BiopFuncp = V3Number& (*)(V3Number&, V3Number&);
// MATH
// "this" is the output, as we need the output width before some computations
V3Number& isTrue(const V3Number& lhs);
V3Number& opBitsNonX(const V3Number& lhs); // 0/1->1, X/Z->0
V3Number& opBitsOne(const V3Number& lhs); // 1->1, 0/X/Z->0
V3Number& opBitsXZ(const V3Number& lhs); // 0/1->0, X/Z->1