mirror of
https://github.com/verilator/verilator.git
synced 2025-05-03 14:06:54 +00:00
Emit: Remove emitVarCmtChg
emitVarCmtChg used to emit MTask affinity of variables in comments in the generated header. This causes unnecessary changes in the output when scheduling changes slightly between compilation, hindering ccache reuse. If needing this info for debugging Verilator, add a separate dump file instead of emitting it in the generated code.
This commit is contained in:
parent
a8f83d5758
commit
6c332a2f8e
@ -640,13 +640,6 @@ AstVar* AstVar::scVarRecurse(AstNode* nodep) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
string AstVar::mtasksString() const {
|
||||
std::ostringstream os;
|
||||
os << "all: ";
|
||||
for (const auto& id : m_mtaskIds) os << id << " ";
|
||||
return os.str();
|
||||
}
|
||||
|
||||
class AstNodeDType::CTypeRecursed final {
|
||||
public:
|
||||
string m_type; // The base type, e.g.: "Foo_t"s
|
||||
|
@ -2227,7 +2227,6 @@ public:
|
||||
void addProducingMTaskId(int id) { m_mtaskIds.insert(id); }
|
||||
void addConsumingMTaskId(int id) { m_mtaskIds.insert(id); }
|
||||
const MTaskIdSet& mtaskIds() const { return m_mtaskIds; }
|
||||
string mtasksString() const;
|
||||
};
|
||||
|
||||
class AstDefParam final : public AstNode {
|
||||
|
@ -124,13 +124,6 @@ public:
|
||||
puts("[" + cvtToStr(arrayp->elementsConst()) + "]");
|
||||
}
|
||||
}
|
||||
void emitVarCmtChg(const AstVar* varp, string* curVarCmtp) {
|
||||
string newVarCmt = varp->mtasksString();
|
||||
if (*curVarCmtp != newVarCmt) {
|
||||
*curVarCmtp = newVarCmt;
|
||||
if (v3Global.opt.threads()) puts("// Begin mtask footprint " + *curVarCmtp + "\n");
|
||||
}
|
||||
}
|
||||
void emitTypedefs(AstNode* firstp) {
|
||||
bool first = true;
|
||||
for (AstNode* loopp = firstp; loopp; loopp = loopp->nextp()) {
|
||||
@ -3097,7 +3090,6 @@ void EmitCStmts::emitSortedVarList(const VarVec& anons, const VarVec& nonanons,
|
||||
if (anonL1s != 1) puts("struct {\n");
|
||||
for (int l0 = 0; l0 < lim && it != anons.cend(); ++l0) {
|
||||
const AstVar* varp = *it;
|
||||
emitVarCmtChg(varp, &curVarCmt);
|
||||
emitVarDecl(varp, prefixIfImp);
|
||||
++it;
|
||||
}
|
||||
@ -3110,15 +3102,11 @@ void EmitCStmts::emitSortedVarList(const VarVec& anons, const VarVec& nonanons,
|
||||
// Leftovers, just in case off by one error somewhere above
|
||||
for (; it != anons.end(); ++it) {
|
||||
const AstVar* varp = *it;
|
||||
emitVarCmtChg(varp, &curVarCmt);
|
||||
emitVarDecl(varp, prefixIfImp);
|
||||
}
|
||||
}
|
||||
// Output nonanons
|
||||
for (const AstVar* varp : nonanons) {
|
||||
emitVarCmtChg(varp, &curVarCmt);
|
||||
emitVarDecl(varp, prefixIfImp);
|
||||
}
|
||||
for (const AstVar* varp : nonanons) { emitVarDecl(varp, prefixIfImp); }
|
||||
}
|
||||
|
||||
void EmitCImp::emitThreadingState() {
|
||||
|
Loading…
Reference in New Issue
Block a user