Internals: Favor AstNetlist for global thread errors, and allow 0 line number error suppression.
This commit is contained in:
parent
5cbf80918f
commit
6a5a2a56d7
|
|
@ -5852,15 +5852,15 @@ class AstNetlist : public AstNode {
|
|||
// Parents: none
|
||||
// Children: MODULEs & CFILEs
|
||||
private:
|
||||
AstTypeTable* m_typeTablep; // Reference to top type table, for faster lookup
|
||||
AstPackage* m_dollarUnitPkgp;
|
||||
AstCFunc* m_evalp; // The '_eval' function
|
||||
AstTypeTable* m_typeTablep; // Reference to top type table, for faster lookup
|
||||
AstPackage* m_dollarUnitPkgp; // $unit
|
||||
AstCFunc* m_evalp; // The '_eval' function
|
||||
AstExecGraph* m_execGraphp; // Execution MTask graph for threads>1 mode
|
||||
public:
|
||||
AstNetlist()
|
||||
: AstNode(new FileLine("AstRoot",0))
|
||||
, m_typeTablep(NULL)
|
||||
, m_dollarUnitPkgp(NULL)
|
||||
: AstNode(new FileLine("AstRoot", 0))
|
||||
, m_typeTablep(NULL)
|
||||
, m_dollarUnitPkgp(NULL)
|
||||
, m_evalp(NULL)
|
||||
, m_execGraphp(NULL) { }
|
||||
ASTNODE_NODE_FUNCS(Netlist)
|
||||
|
|
@ -5876,7 +5876,7 @@ public:
|
|||
void addModulep(AstNodeModule* modulep) { addOp1p(modulep); }
|
||||
AstCFile* filesp() const { return VN_CAST(op2p(), CFile);} // op2 = List of files
|
||||
void addFilesp(AstCFile* filep) { addOp2p(filep); }
|
||||
AstNode* miscsp() const { return op3p();} // op3 = List of dtypes etc
|
||||
AstNode* miscsp() const { return op3p(); } // op3 = List of dtypes etc
|
||||
void addMiscsp(AstNode* nodep) { addOp3p(nodep); }
|
||||
AstTypeTable* typeTablep() { return m_typeTablep; }
|
||||
void addTypeTablep(AstTypeTable* nodep) { m_typeTablep = nodep; addMiscsp(nodep); }
|
||||
|
|
|
|||
|
|
@ -235,14 +235,11 @@ void FileLine::modifyStateInherit(const FileLine* fromp) {
|
|||
}
|
||||
|
||||
void FileLine::v3errorEnd(std::ostringstream& str) {
|
||||
if (m_lineno) {
|
||||
std::ostringstream nsstr;
|
||||
nsstr<<this<<str.str();
|
||||
if (warnIsOff(V3Error::errorCode())) V3Error::suppressThisWarning();
|
||||
V3Error::v3errorEnd(nsstr);
|
||||
} else {
|
||||
V3Error::v3errorEnd(str);
|
||||
}
|
||||
std::ostringstream nsstr;
|
||||
if (m_lineno) nsstr<<this;
|
||||
nsstr<<str.str();
|
||||
if (warnIsOff(V3Error::errorCode())) V3Error::suppressThisWarning();
|
||||
V3Error::v3errorEnd(nsstr);
|
||||
}
|
||||
|
||||
string FileLine::warnMore() const {
|
||||
|
|
|
|||
|
|
@ -1910,7 +1910,7 @@ void OrderVisitor::processMTasks() {
|
|||
|
||||
// Create the AstExecGraph node which represents the execution
|
||||
// of the MTask graph.
|
||||
FileLine* rootFlp = new FileLine("AstRoot", 0);
|
||||
FileLine* rootFlp = v3Global.rootp()->fileline();
|
||||
AstExecGraph* execGraphp = new AstExecGraph(rootFlp);
|
||||
m_scopetopp->addActivep(execGraphp);
|
||||
v3Global.rootp()->execGraphp(execGraphp);
|
||||
|
|
|
|||
|
|
@ -1248,11 +1248,8 @@ public:
|
|||
if (mtaskCount > maxMTasks) {
|
||||
uint32_t oldLimit = m_scoreLimit;
|
||||
m_scoreLimit = (m_scoreLimit * 120) / 100;
|
||||
|
||||
// Line must be >0 otherwise FileLine doesn't check
|
||||
// if the warning is suppressed with -Wno-UNOPTTHREADS
|
||||
FileLine dummyFl("AstRoot", 1);
|
||||
dummyFl.v3warn(UNOPTTHREADS, "Thread scheduler is unable to provide requested parallelism; consider asking for fewer threads.");
|
||||
v3Global.rootp()->fileline()->v3warn(
|
||||
UNOPTTHREADS, "Thread scheduler is unable to provide requested parallelism; consider asking for fewer threads.");
|
||||
UINFO(1,"Critical path limit was="<<oldLimit
|
||||
<<" now="<<m_scoreLimit<<endl);
|
||||
continue;
|
||||
|
|
|
|||
Loading…
Reference in New Issue