Skip to content

Commit 46c7b69

Browse files
committed
Internals: UINFO now includes newline itself. No functional change.
1 parent 091be59 commit 46c7b69

File tree

129 files changed

+1259
-1287
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

129 files changed

+1259
-1287
lines changed

src/V3Active.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -647,7 +647,7 @@ class ActiveVisitor final : public VNVisitor {
647647
// Active class functions
648648

649649
void V3Active::activeAll(AstNetlist* nodep) {
650-
UINFO(2, __FUNCTION__ << ": " << endl);
650+
UINFO(2, __FUNCTION__ << ":");
651651
{ ActiveVisitor{nodep}; } // Destruct before checking
652652
V3Global::dumpCheckGlobalTree("active", 0, dumpTreeEitherLevel() >= 3);
653653
}

src/V3ActiveTop.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,11 @@ class ActiveTopVisitor final : public VNVisitor {
6161
void visit(AstNodeModule* nodep) override {
6262
// Create required actives and add to module
6363
// We can start ordering at a module, or a scope
64-
UINFO(4, " MOD " << nodep << endl);
64+
UINFO(4, " MOD " << nodep);
6565
iterateChildren(nodep);
6666
}
6767
void visit(AstActive* nodep) override {
68-
UINFO(4, " ACTIVE " << nodep << endl);
68+
UINFO(4, " ACTIVE " << nodep);
6969
// Remove duplicate clocks and such; sensesp() may change!
7070
V3Const::constifyExpensiveEdit(nodep);
7171
AstSenTree* sensesp = nodep->sensesp();
@@ -95,10 +95,10 @@ class ActiveTopVisitor final : public VNVisitor {
9595
// Move the SENTREE for each active up to the global level.
9696
// This way we'll easily see what clock domains are identical
9797
AstSenTree* const wantp = m_finder.getSenTree(sensesp);
98-
UINFO(4, " lookdone\n");
98+
UINFO(4, " lookdone");
9999
if (wantp != sensesp) {
100100
// Move the active's contents to the other active
101-
UINFO(4, " merge active " << sensesp << " into " << wantp << endl);
101+
UINFO(4, " merge active " << sensesp << " into " << wantp);
102102
if (nodep->sensesStorep()) {
103103
UASSERT_OBJ(sensesp == nodep->sensesStorep(), nodep,
104104
"sensesStore should have been deleted earlier if different");
@@ -155,7 +155,7 @@ class ActiveTopVisitor final : public VNVisitor {
155155
// Active class functions
156156

157157
void V3ActiveTop::activeTopAll(AstNetlist* nodep) {
158-
UINFO(2, __FUNCTION__ << ": " << endl);
158+
UINFO(2, __FUNCTION__ << ":");
159159
{ ActiveTopVisitor{nodep}; } // Destruct before checking
160160
V3Global::dumpCheckGlobalTree("activetop", 0, dumpTreeEitherLevel() >= 3);
161161
}

src/V3Assert.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,7 @@ class AssertVisitor final : public VNVisitor {
635635
FileLine* const fl = nodep->fileline();
636636
switch (nodep->ctlType()) {
637637
case VAssertCtlType::ON:
638-
UINFO(9, "Generating assertctl for a module: " << m_modp << endl);
638+
UINFO(9, "Generating assertctl for a module: " << m_modp);
639639
nodep->replaceWith(new AstCExpr{
640640
fl,
641641
"vlSymsp->_vm_contextp__->assertOnSet("s + std::to_string(nodep->ctlAssertTypes())
@@ -644,7 +644,7 @@ class AssertVisitor final : public VNVisitor {
644644
break;
645645
case VAssertCtlType::OFF:
646646
case VAssertCtlType::KILL: {
647-
UINFO(9, "Generating assertctl for a module: " << m_modp << endl);
647+
UINFO(9, "Generating assertctl for a module: " << m_modp);
648648
nodep->replaceWith(new AstCExpr{fl,
649649
"vlSymsp->_vm_contextp__->assertOnClear("s
650650
+ std::to_string(nodep->ctlAssertTypes()) + " ,"s
@@ -725,7 +725,7 @@ class AssertVisitor final : public VNVisitor {
725725
// Top Assert class
726726

727727
void V3Assert::assertAll(AstNetlist* nodep) {
728-
UINFO(2, __FUNCTION__ << ": " << endl);
728+
UINFO(2, __FUNCTION__ << ":");
729729
{ AssertVisitor{nodep}; } // Destruct before checking
730730
V3Global::dumpCheckGlobalTree("assert", 0, dumpTreeEitherLevel() >= 3);
731731
}

src/V3AssertPre.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ class AssertPreVisitor final : public VNVisitor {
156156
void visit(AstClocking* const nodep) override {
157157
VL_RESTORER(m_clockingp);
158158
m_clockingp = nodep;
159-
UINFO(8, " CLOCKING" << nodep << endl);
159+
UINFO(8, " CLOCKING" << nodep);
160160
iterateChildren(nodep);
161161
if (nodep->eventp()) nodep->addNextHere(nodep->eventp()->unlinkFrBack());
162162
VL_DO_DANGLING(pushDeletep(nodep->unlinkFrBack()), nodep);
@@ -359,22 +359,22 @@ class AssertPreVisitor final : public VNVisitor {
359359
}
360360
}
361361
void visit(AstNodeVarRef* nodep) override {
362-
UINFO(8, " -varref: " << nodep << endl);
363-
UINFO(8, " -varref-var-back: " << nodep->varp()->backp() << endl);
364-
UINFO(8, " -varref-var-user1: " << nodep->varp()->user1p() << endl);
362+
UINFO(8, " -varref: " << nodep);
363+
UINFO(8, " -varref-var-back: " << nodep->varp()->backp());
364+
UINFO(8, " -varref-var-user1: " << nodep->varp()->user1p());
365365
if (AstClockingItem* const itemp = VN_CAST(
366366
nodep->varp()->user1p() ? nodep->varp()->user1p() : nodep->varp()->firstAbovep(),
367367
ClockingItem)) {
368368
if (nodep->user1()) return;
369369

370370
// ensure linking still works, this has to be done only once
371371
if (AstVarXRef* xrefp = VN_CAST(nodep, VarXRef)) {
372-
UINFO(8, " -clockvarxref-in: " << xrefp << endl);
372+
UINFO(8, " -clockvarxref-in: " << xrefp);
373373
string dotted = xrefp->dotted();
374374
const size_t dotPos = dotted.rfind('.');
375375
dotted.erase(dotPos, string::npos);
376376
xrefp->dotted(dotted);
377-
UINFO(8, " -clockvarxref-out: " << xrefp << endl);
377+
UINFO(8, " -clockvarxref-out: " << xrefp);
378378
m_xrefsp.emplace_back(xrefp);
379379
}
380380

@@ -613,7 +613,7 @@ class AssertPreVisitor final : public VNVisitor {
613613
// Top Assert class
614614

615615
void V3AssertPre::assertPreAll(AstNetlist* nodep) {
616-
UINFO(2, __FUNCTION__ << ": " << endl);
616+
UINFO(2, __FUNCTION__ << ":");
617617
{ AssertPreVisitor{nodep}; } // Destruct before checking
618618
V3Global::dumpCheckGlobalTree("assertpre", 0, dumpTreeEitherLevel() >= 3);
619619
}

src/V3Ast.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -671,7 +671,7 @@ AstNode* AstNode::unlinkFrBack(VNRelinker* linkerp) {
671671

672672
void AstNode::relink(VNRelinker* linkerp) {
673673
if (debug() > 8) {
674-
UINFO(0, " EDIT: relink: ");
674+
UINFO_PREFIX(" EDIT: relink: ");
675675
dumpPtrs();
676676
}
677677
AstNode* const newp = this;
@@ -1344,7 +1344,7 @@ void AstNode::dumpTreeFile(const string& filename, bool doDump) {
13441344
// Not const function as calls checkTree
13451345
if (doDump) {
13461346
{ // Write log & close
1347-
UINFO(2, "Dumping " << filename << endl);
1347+
UINFO(2, "Dumping " << filename);
13481348
const std::unique_ptr<std::ofstream> logsp{V3File::new_ofstream(filename)};
13491349
if (logsp->fail()) v3fatal("Can't write file: " << filename);
13501350
*logsp << "Verilator Tree Dump (format 0x3900) from <e" << std::dec << editCountLast();
@@ -1389,7 +1389,7 @@ void AstNode::dumpTreeDot(std::ostream& os) const {
13891389

13901390
void AstNode::dumpTreeJsonFile(const string& filename, bool doDump) {
13911391
if (!doDump) return;
1392-
UINFO(2, "Dumping " << filename << endl);
1392+
UINFO(2, "Dumping " << filename);
13931393
const std::unique_ptr<std::ofstream> treejsonp{V3File::new_ofstream(filename)};
13941394
if (treejsonp->fail()) v3fatal("Can't write file: " << filename);
13951395
dumpTreeJson(*treejsonp);
@@ -1398,7 +1398,7 @@ void AstNode::dumpTreeJsonFile(const string& filename, bool doDump) {
13981398

13991399
void AstNode::dumpJsonMetaFileGdb(const char* filename) { dumpJsonMetaFile(filename); }
14001400
void AstNode::dumpJsonMetaFile(const string& filename) {
1401-
UINFO(2, "Dumping " << filename << endl);
1401+
UINFO(2, "Dumping " << filename);
14021402
const std::unique_ptr<std::ofstream> treejsonp{V3File::new_ofstream(filename)};
14031403
if (treejsonp->fail()) v3fatalStatic("Can't write file: " << filename);
14041404
*treejsonp << '{';
@@ -1412,7 +1412,7 @@ void AstNode::dumpJsonMetaFile(const string& filename) {
14121412

14131413
void AstNode::dumpTreeDotFile(const string& filename, bool doDump) {
14141414
if (doDump) {
1415-
UINFO(2, "Dumping " << filename << endl);
1415+
UINFO(2, "Dumping " << filename);
14161416
const std::unique_ptr<std::ofstream> treedotp{V3File::new_ofstream(filename)};
14171417
if (treedotp->fail()) v3fatal("Can't write file: " << filename);
14181418
*treedotp << "digraph vTree{\n";
@@ -1608,9 +1608,9 @@ static VCastable computeCastableImp(const AstNodeDType* toDtp, const AstNodeDTyp
16081608
VCastable AstNode::computeCastable(const AstNodeDType* toDtp, const AstNodeDType* fromDtp,
16091609
const AstNode* fromConstp) {
16101610
const auto castable = computeCastableImp(toDtp, fromDtp, fromConstp);
1611-
UINFO(9, " castable=" << castable << " for " << toDtp << endl);
1612-
UINFO(9, " =?= " << fromDtp << endl);
1613-
if (fromConstp) UINFO(9, " const= " << fromConstp << endl);
1611+
UINFO(9, " castable=" << castable << " for " << toDtp);
1612+
UINFO(9, " =?= " << fromDtp);
1613+
if (fromConstp) UINFO(9, " const= " << fromConstp);
16141614
return castable;
16151615
}
16161616

src/V3Begin.cpp

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ class BeginVisitor final : public VNVisitor {
7474
string dot(const string& a, const string& b) { return VString::dot(a, "__DOT__", b); }
7575

7676
void dotNames(const AstNodeBlock* const nodep, const char* const blockName) {
77-
UINFO(8, "nname " << m_namedScope << endl);
77+
UINFO(8, "nname " << m_namedScope);
7878
if (nodep->name() != "") { // Else unneeded unnamed block
7979
// Create data for dotted variable resolution
8080
string dottedname = nodep->name() + "__DOT__"; // So always found
@@ -149,7 +149,7 @@ class BeginVisitor final : public VNVisitor {
149149
// Rename it (e.g. class under a generate)
150150
if (m_unnamedScope != "") {
151151
nodep->name(dot(m_unnamedScope, nodep->name()));
152-
UINFO(8, " rename to " << nodep->name() << endl);
152+
UINFO(8, " rename to " << nodep->name());
153153
m_statep->userMarkChanged(nodep);
154154
}
155155
VL_RESTORER(m_displayScope);
@@ -161,11 +161,11 @@ class BeginVisitor final : public VNVisitor {
161161
iterateChildren(nodep);
162162
}
163163
void visit(AstNodeFTask* nodep) override {
164-
UINFO(8, " " << nodep << endl);
164+
UINFO(8, " " << nodep);
165165
// Rename it
166166
if (m_unnamedScope != "") {
167167
nodep->name(dot(m_unnamedScope, nodep->name()));
168-
UINFO(8, " rename to " << nodep->name() << endl);
168+
UINFO(8, " rename to " << nodep->name());
169169
m_statep->userMarkChanged(nodep);
170170
}
171171
// BEGIN wrapping a function rename that function, but don't affect
@@ -200,7 +200,7 @@ class BeginVisitor final : public VNVisitor {
200200
}
201201
void visit(AstBegin* nodep) override {
202202
// Begin blocks were only useful in variable creation, change names and delete
203-
UINFO(8, " " << nodep << endl);
203+
UINFO(8, " " << nodep);
204204
VL_RESTORER(m_displayScope);
205205
VL_RESTORER(m_namedScope);
206206
VL_RESTORER(m_unnamedScope);
@@ -255,23 +255,23 @@ class BeginVisitor final : public VNVisitor {
255255
}
256256
}
257257
void visit(AstCell* nodep) override {
258-
UINFO(8, " CELL " << nodep << endl);
258+
UINFO(8, " CELL " << nodep);
259259
if (m_namedScope != "") {
260260
m_statep->userMarkChanged(nodep);
261261
// Rename it
262262
nodep->name(dot(m_namedScope, nodep->name()));
263-
UINFO(8, " rename to " << nodep->name() << endl);
263+
UINFO(8, " rename to " << nodep->name());
264264
// Move to module
265265
nodep->unlinkFrBack();
266266
m_modp->addStmtsp(nodep);
267267
}
268268
iterateChildren(nodep);
269269
}
270270
void visit(AstVarXRef* nodep) override {
271-
UINFO(9, " VARXREF " << nodep << endl);
271+
UINFO(9, " VARXREF " << nodep);
272272
if (m_namedScope != "" && nodep->inlinedDots() == "" && !m_ftaskp) {
273273
nodep->inlinedDots(m_namedScope);
274-
UINFO(9, " rescope to " << nodep << endl);
274+
UINFO(9, " rescope to " << nodep);
275275
}
276276
}
277277
void visit(AstScopeName* nodep) override {
@@ -339,23 +339,23 @@ class BeginRelinkVisitor final : public VNVisitorConst {
339339
void visit(AstNodeFTaskRef* nodep) override {
340340
UASSERT_OBJ(nodep->taskp(), nodep, "unlinked");
341341
if (nodep->taskp()->user1()) { // It was converted
342-
UINFO(9, " relinkFTask " << nodep << endl);
342+
UINFO(9, " relinkFTask " << nodep);
343343
nodep->name(nodep->taskp()->name());
344344
}
345345
iterateChildrenConst(nodep);
346346
}
347347
void visit(AstVarRef* nodep) override {
348348
if (nodep->varp()->user1()) { // It was converted
349-
UINFO(9, " relinVarRef " << nodep << endl);
349+
UINFO(9, " relinVarRef " << nodep);
350350
}
351351
iterateChildrenConst(nodep);
352352
}
353353
void visit(AstIfaceRefDType* nodep) override {
354354
// May have changed cell names
355355
// TypeTable is always after all modules, so names are stable
356-
UINFO(8, " IFACEREFDTYPE " << nodep << endl);
356+
UINFO(8, " IFACEREFDTYPE " << nodep);
357357
if (nodep->cellp()) nodep->cellName(nodep->cellp()->name());
358-
UINFO(8, " rename to " << nodep << endl);
358+
UINFO(8, " rename to " << nodep);
359359
iterateChildrenConst(nodep);
360360
}
361361
//--------------------
@@ -371,7 +371,7 @@ class BeginRelinkVisitor final : public VNVisitorConst {
371371
// Task class functions
372372

373373
void V3Begin::debeginAll(AstNetlist* nodep) {
374-
UINFO(2, __FUNCTION__ << ": " << endl);
374+
UINFO(2, __FUNCTION__ << ":");
375375
{
376376
BeginState state;
377377
{ BeginVisitor{nodep, &state}; }

src/V3Branch.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,14 @@ class BranchVisitor final : public VNVisitorConst {
5353
}
5454
void checkUnlikely(AstNode* nodep) {
5555
if (nodep->isUnlikely()) {
56-
UINFO(4, " UNLIKELY: " << nodep << endl);
56+
UINFO(4, " UNLIKELY: " << nodep);
5757
m_unlikely++;
5858
}
5959
}
6060

6161
// VISITORS
6262
void visit(AstNodeIf* nodep) override {
63-
UINFO(4, " IF: " << nodep << endl);
63+
UINFO(4, " IF: " << nodep);
6464
VL_RESTORER(m_likely);
6565
VL_RESTORER(m_unlikely);
6666
{
@@ -119,6 +119,6 @@ class BranchVisitor final : public VNVisitorConst {
119119
// Branch class functions
120120

121121
void V3Branch::branchAll(AstNetlist* nodep) {
122-
UINFO(2, __FUNCTION__ << ": " << endl);
122+
UINFO(2, __FUNCTION__ << ":");
123123
{ BranchVisitor{nodep}; }
124124
}

src/V3Broken.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -332,11 +332,11 @@ class BrokenCheckVisitor final : public VNVisitorConst {
332332
// Broken check entry point
333333

334334
void V3Broken::brokenAll(AstNetlist* nodep) {
335-
// UINFO(9, __FUNCTION__ << ": " << endl);
335+
// UINFO(9, __FUNCTION__ << ": ");
336336
static bool inBroken = false;
337337
if (VL_UNCOVERABLE(inBroken)) {
338338
// A error called by broken can recurse back into broken; avoid this
339-
UINFO(1, "Broken called under broken, skipping recursion.\n"); // LCOV_EXCL_LINE
339+
UINFO(1, "Broken called under broken, skipping recursion."); // LCOV_EXCL_LINE
340340
} else {
341341
inBroken = true;
342342

src/V3CCtors.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ void V3CCtors::evalAsserts() {
260260
}
261261

262262
void V3CCtors::cctorsAll() {
263-
UINFO(2, __FUNCTION__ << ": " << endl);
263+
UINFO(2, __FUNCTION__ << ":");
264264
evalAsserts();
265265
{ CCtorsVisitor{v3Global.rootp()}; }
266266
V3Global::dumpCheckGlobalTree("cctors", 0, dumpTreeEitherLevel() >= 3);

src/V3CUse.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ class CUseVisitor final : public VNVisitorConst {
9898
for (auto& used : m_didUse) {
9999
AstCUse* const newp = new AstCUse{used.second.first, used.second.second, used.first};
100100
m_modp->addStmtsp(newp);
101-
UINFO(8, "Insert " << newp << endl);
101+
UINFO(8, "Insert " << newp);
102102
}
103103
}
104104
~CUseVisitor() override = default;
@@ -109,7 +109,7 @@ class CUseVisitor final : public VNVisitorConst {
109109
// Class class functions
110110

111111
void V3CUse::cUseAll() {
112-
UINFO(2, __FUNCTION__ << ": " << endl);
112+
UINFO(2, __FUNCTION__ << ":");
113113
// Call visitor separately for each module, so visitor state is cleared
114114
for (AstNodeModule* modp = v3Global.rootp()->modulesp(); modp;
115115
modp = VN_AS(modp->nextp(), NodeModule)) {

src/V3Case.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ class CaseVisitor final : public VNVisitor {
188188
m_caseNoOverlapsAllCovered = false;
189189
return false; // Too wide for analysis
190190
}
191-
UINFO(8, "Simple case statement: " << nodep << endl);
191+
UINFO(8, "Simple case statement: " << nodep);
192192
const uint32_t numCases = 1UL << m_caseWidth;
193193
// Zero list of items for each value
194194
for (uint32_t i = 0; i < numCases; ++i) m_valueItem[i] = nullptr;
@@ -376,7 +376,7 @@ class CaseVisitor final : public VNVisitor {
376376
if (debug() >= 9) { // LCOV_EXCL_START
377377
for (uint32_t i = 0; i < (1UL << m_caseWidth); ++i) {
378378
if (const AstNode* const itemp = m_valueItem[i]) {
379-
UINFO(9, "Value " << std::hex << i << " " << itemp << endl);
379+
UINFO(9, "Value " << std::hex << i << " " << itemp);
380380
}
381381
}
382382
} // LCOV_EXCL_STOP
@@ -600,11 +600,11 @@ class CaseVisitor final : public VNVisitor {
600600
// Case class functions
601601

602602
void V3Case::caseAll(AstNetlist* nodep) {
603-
UINFO(2, __FUNCTION__ << ": " << endl);
603+
UINFO(2, __FUNCTION__ << ":");
604604
{ CaseVisitor{nodep}; } // Destruct before checking
605605
V3Global::dumpCheckGlobalTree("case", 0, dumpTreeEitherLevel() >= 3);
606606
}
607607
void V3Case::caseLint(AstNodeCase* nodep) {
608-
UINFO(4, __FUNCTION__ << ": " << endl);
608+
UINFO(4, __FUNCTION__ << ": ");
609609
{ CaseLintVisitor{nodep}; }
610610
}

src/V3Cast.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class CastVisitor final : public VNVisitor {
6262
//
6363
AstCCast* const castp
6464
= new AstCCast{nodep->fileline(), nodep, needsize, nodep->widthMin()};
65-
UINFO(4, " MadeCast " << static_cast<void*>(castp) << " for " << nodep << endl);
65+
UINFO(4, " MadeCast " << static_cast<void*>(castp) << " for " << nodep);
6666
relinkHandle.relink(castp);
6767
// if (debug() > 8) castp->dumpTree("- castins: ");
6868
//
@@ -239,7 +239,7 @@ class CastVisitor final : public VNVisitor {
239239
// Cast class functions
240240

241241
void V3Cast::castAll(AstNetlist* nodep) {
242-
UINFO(2, __FUNCTION__ << ": " << endl);
242+
UINFO(2, __FUNCTION__ << ":");
243243
{ CastVisitor{nodep}; } // Destruct before checking
244244
V3Global::dumpCheckGlobalTree("cast", 0, dumpTreeEitherLevel() >= 3);
245245
}

0 commit comments

Comments
 (0)