Commentary

This commit is contained in:
Wilson Snyder 2025-01-21 22:00:04 -05:00
parent bed9aa9904
commit d8080008b4
4 changed files with 11 additions and 13 deletions

View File

@ -4151,7 +4151,7 @@ public:
return new AstArraySel{fileline(), lhsp, rhsp};
}
void numberOperate(V3Number& out, const V3Number& lhs, const V3Number& rhs) override {
V3ERROR_NA; /* How can from be a const? */
V3ERROR_NA; // How can from be a const?
}
string emitVerilog() override { return "%k(%l%f[%r])"; }
string emitC() override { return "%li%k[%ri]"; }

View File

@ -3377,7 +3377,7 @@ class ConstVisitor final : public VNVisitor {
void visit(AstJumpGo* nodep) override {
iterateChildren(nodep);
// Jump to label where label immediately follows this go is not useful
// Jump to label where label immediately follows this JumpGo is not useful
if (nodep->labelp() == VN_CAST(nodep->nextp(), JumpLabel)) {
VL_DO_DANGLING(pushDeletep(nodep->unlinkFrBack()), nodep);
// Keep the label, might be other jumps pointing to it, gets cleaned later

View File

@ -345,16 +345,14 @@ public:
if (m_useSelfForThis) {
m_usevlSelfRef = true;
/*
* Using reference to the vlSelf pointer will help the C++
* compiler to have dereferenceable hints, which can help to
* reduce the need for branch instructions in the generated
* code to allow the compiler to generate load store after the
* if condition (including short-circuit evaluation)
* speculatively and also reduce the data cache pollution when
* executing in the wrong path to make verilator-generated code
* run faster.
*/
// Using reference to the vlSelf pointer will help the C++
// compiler to have dereferenceable hints, which can help to
// reduce the need for branch instructions in the generated
// code to allow the compiler to generate load store after the
// if condition (including short-circuit evaluation)
// speculatively and also reduce the data cache pollution when
// executing in the wrong path to make verilator-generated code
// run faster.
puts("auto& vlSelfRef = std::ref(*vlSelf).get();\n");
}

View File

@ -14,7 +14,7 @@ int sc_main(int argc, char* argv[]) {
std::vector<sc_object*> ch = tb->get_child_objects();
bool found = false;
/* We expect to find clk in here. */
// We expect to find clk in here
for (int i = 0; i < ch.size(); ++i) {
if (!std::strcmp(ch[i]->basename(), "clk")) found = true;
}