From patchwork Thu Aug 1 14:57:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arthur Cohen X-Patchwork-Id: 1967846 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=embecosm.com header.i=@embecosm.com header.a=rsa-sha256 header.s=google header.b=F9DBOOrB; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WZY4B5tzfz1ybX for ; Fri, 2 Aug 2024 01:37:14 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 0A0E0384F4BE for ; Thu, 1 Aug 2024 15:37:13 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-lf1-x134.google.com (mail-lf1-x134.google.com [IPv6:2a00:1450:4864:20::134]) by sourceware.org (Postfix) with ESMTPS id 29A523865C2B for ; Thu, 1 Aug 2024 15:00:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 29A523865C2B Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=embecosm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=embecosm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 29A523865C2B Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::134 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1722524488; cv=none; b=JyjOBpr/QHBzA5aJfyZX0q7lxXlyrdx9aDigils8xqbtN/xftvQJYH4Zo+5IQgmtFjZrhN1bnfZiUrmCXsmfDhJTHg90MLQz06fQSqp634JSQuVYpibMlHcBqHV8pHGXxl//bDph76DYFZeC+dBv6iccKabdrmOrADiXJKlIIxM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1722524488; c=relaxed/simple; bh=yO6Z+wDpGzKuJ7TgvT9vicQ990pfk6NKNQ6HTUvtmZQ=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=LpQ+llssvqDQblgxglThVF/FFcoSSv7ojRayUpnQLzBWs51V0nphvqp4hwC5AN2vyIvUfJSHLzu8iv6ZK+tdRQmt8ZlVJ07mkzHtTXuqpu9foZl3IP3YlGzGFxiaME5aSNY242gVCSNKoWNVu5hcdBsNg6Y7Pwb3cfi8o43evpc= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-lf1-x134.google.com with SMTP id 2adb3069b0e04-52f01ec08d6so10378832e87.2 for ; Thu, 01 Aug 2024 08:00:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; t=1722524434; x=1723129234; darn=gcc.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=JlS/K3skbD+gFutuLtj0EDZokA8T0QlDLbhzoc+vmdk=; b=F9DBOOrBc+suSBMthEldrpCniunjua0NFVavHd3D7UvKsu2/ImlfbwglXxa2zirjRj XS9pR26LedZuzRG0Z0v+Isqq8C86FMl8hY6+hSBlY0+9Y9oPiIAUgBoOPzZQLoaFzjnA UYmL2/X38KCCag5XgHvokN6i4VKwJApk0uu+7T5qT9MYR4fJte56bh8ljXG3bmjUokpA z/o8/E3/iJJpUIto2hCnpryVcZKAYYBd5Fkb8WU6mHEo2FjazvURvAZobmJiiMojgdB8 Iy/XpImSgge52z3rS4oTOzG7FrRDTLZ4DQqZVprwgAhzocBQJ6DljddRecQOXYPKAb8k mUxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722524434; x=1723129234; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=JlS/K3skbD+gFutuLtj0EDZokA8T0QlDLbhzoc+vmdk=; b=OBOzvwiy4ekosoddQ8V4ui7MMjEAkO/R0fvA4s+UYcSoCLusJ4Jl2rvdi7uFOo7dfi vGEGczEudIAe0Y+wBMpgrqUzIIFgdbN740qL4XnlON3MFxcIyKgnwB75WsEaA2pij3id bsDHEp0WwsdQ4ZbD/j4u8P0e55xm4mhnfc2l14iXQdWWD/zdV+b0FLyBu66ZrKEWhTYi inezOSPk187SWXYK4upvt78kS1ZFqwF0gR7NSq11i/aIPwTfVb3ss3Rm+K6zyIo5pYVf IV841YQyS/jz2CHIPDfFKxIWkOQnb99E8wdsoh8eVM4wd9mM3/eTMxUbDxZZr8WEai0z ssqw== X-Gm-Message-State: AOJu0Yy4FqHdsU3KrDiWL2xiw5FVwRjj6cZ9HEEcpeHxWb3tHVFEX+cX nCx7YWyNQYbUF0XNpzaEFlMaqVv2eItRxnt3UMESgGVFJSaBX/iO9E5VadolTlx7XbaeyyXaFRv xDv8t X-Google-Smtp-Source: AGHT+IEvgYC6CJX2x7SEU2jZ2W+dPvYQEkFsJGxMZUOdiJqbs3xeLtK0egLsC/9kSg4QZelfo/8PoA== X-Received: by 2002:a05:6512:1323:b0:52e:95dd:a8ef with SMTP id 2adb3069b0e04-530bb3837eamr126927e87.27.1722524434138; Thu, 01 Aug 2024 08:00:34 -0700 (PDT) Received: from platypus.lan ([2a04:cec2:9:dc84:3622:6733:ff49:ee91]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5ac63590592sm10252456a12.25.2024.08.01.08.00.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Aug 2024 08:00:33 -0700 (PDT) From: Arthur Cohen To: gcc-patches@gcc.gnu.org Cc: gcc-rust@gcc.gnu.org, Jakub Dupak Subject: [PATCH 111/125] gccrs: borrowck: Unify BIR terminilogy (node->statement) Date: Thu, 1 Aug 2024 16:57:47 +0200 Message-ID: <20240801145809.366388-113-arthur.cohen@embecosm.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240801145809.366388-2-arthur.cohen@embecosm.com> References: <20240801145809.366388-2-arthur.cohen@embecosm.com> MIME-Version: 1.0 X-Spam-Status: No, score=-14.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org From: Jakub Dupak gcc/rust/ChangeLog: * checks/errors/borrowck/bir-design-notes.md (nodes): Rename node to statement. (Nodes): Rename node to statement. * checks/errors/borrowck/rust-bir-builder-expr-stmt.cc (ExprStmtBuilder::visit): Rename node to statement. * checks/errors/borrowck/rust-bir-builder-internal.h: Rename node to statement. * checks/errors/borrowck/rust-bir-builder.h: Rename node to statement. * checks/errors/borrowck/rust-bir-dump.cc (Dump::go): Rename node to statement. (Dump::visit): Rename node to statement. * checks/errors/borrowck/rust-bir-dump.h (class Dump): Rename node to statement. * checks/errors/borrowck/rust-bir-visitor.h (class Node): Rename node to statement. (class Statement): Rename node to statement. * checks/errors/borrowck/rust-bir.h (class Node): Rename node to statement. (class Statement): Rename node to statement. (class AbstractExpr): Rename node to statement. (struct Function): Rename node to statement. (struct BasicBlock): Rename node to statement. Signed-off-by: Jakub Dupak --- .../errors/borrowck/bir-design-notes.md | 13 ++--- .../borrowck/rust-bir-builder-expr-stmt.cc | 2 +- .../borrowck/rust-bir-builder-internal.h | 7 +-- .../checks/errors/borrowck/rust-bir-builder.h | 4 +- .../checks/errors/borrowck/rust-bir-dump.cc | 51 ++++++++++--------- .../checks/errors/borrowck/rust-bir-dump.h | 6 +-- .../checks/errors/borrowck/rust-bir-visitor.h | 4 +- gcc/rust/checks/errors/borrowck/rust-bir.h | 34 ++++++------- 8 files changed, 62 insertions(+), 59 deletions(-) diff --git a/gcc/rust/checks/errors/borrowck/bir-design-notes.md b/gcc/rust/checks/errors/borrowck/bir-design-notes.md index ad622cd7228..e2edc20ffa8 100644 --- a/gcc/rust/checks/errors/borrowck/bir-design-notes.md +++ b/gcc/rust/checks/errors/borrowck/bir-design-notes.md @@ -108,7 +108,7 @@ - Declaration of locals: `let _0: i32;`, where `_0` is the return value (even if it is of the unit type). Arguments are not listed here, they are listed in the function header. - A list of basic blocks: `bb0: { ... }`. The basic block name is the `bb` prefix followed by a number. -- Each basic block consists of a list of BIR nodes (instructions). Instruction can be either assigned to a local (place) or be a statement. +- Each basic block consists of a list of BIR statements. Instruction can be either assigned to a local (place) or be a statement. Instructions take locals (places) as arguments. - Each basic block is terminated with a control flow instruction followed by a list of destinations: - `goto -> bb3;` - a goto instruction with a single destination. @@ -126,16 +126,17 @@ ### Basic Blocks -A basic block is identified by its index in the function's basic block list. It contains a list of BIR nodes (instructions) and a list of successor +A basic block is identified by its index in the function's basic block list. +It contains a list of BIR statements and a list of successor basic block indices in CFG. -### BIR Nodes (Instructions) +### BIR Statements -BIR nodes are of three categories: +BIR statements are of three categories: - An assignment of an expression to a local (place). - A control flow operation (switch, return). -- A special node (not executable) node, which carries additional information for borrow-checking (`StorageDead`, `StorageLive`). +- A special statement (not executable), which carries additional information for borrow-checking (`StorageDead`, `StorageLive`). #### Expressions @@ -147,7 +148,7 @@ - `Operator` represents any kind of operation, except the following, where special information is needed either for borrow-checking or for better debugging. - `BorrowExpr` represents a borrow operation. -- `AssignmentExpr` holds a place for a node of assignment (i.e., no operation is done on the place, it is just assigned). +- `AssignmentExpr` holds a place for an assignment statement (i.e., no operation is done on the place, it is just assigned). - `CallExpr` represents a function call. - For functions, the callable is represented by a constant place (see below). (E.i. all calls use the same constant place.) - For closures and function pointers, the callable is represented by a (non-constant) place. diff --git a/gcc/rust/checks/errors/borrowck/rust-bir-builder-expr-stmt.cc b/gcc/rust/checks/errors/borrowck/rust-bir-builder-expr-stmt.cc index ead6e403661..2c916294ca7 100644 --- a/gcc/rust/checks/errors/borrowck/rust-bir-builder-expr-stmt.cc +++ b/gcc/rust/checks/errors/borrowck/rust-bir-builder-expr-stmt.cc @@ -419,7 +419,7 @@ ExprStmtBuilder::visit (HIR::ReturnExpr &ret) { push_assignment (RETURN_VALUE_PLACE, visit_expr (*ret.get_expr ())); } - ctx.get_current_bb ().statements.emplace_back (Node::Kind::RETURN); + ctx.get_current_bb ().statements.emplace_back (Statement::Kind::RETURN); } void diff --git a/gcc/rust/checks/errors/borrowck/rust-bir-builder-internal.h b/gcc/rust/checks/errors/borrowck/rust-bir-builder-internal.h index b4192677261..eef0f916408 100644 --- a/gcc/rust/checks/errors/borrowck/rust-bir-builder-internal.h +++ b/gcc/rust/checks/errors/borrowck/rust-bir-builder-internal.h @@ -177,7 +177,7 @@ protected: return ctx.place_db.add_variable (nodeid, ty); } -protected: // Helpers to add BIR nodes +protected: // Helpers to add BIR statements void push_assignment (PlaceId lhs, AbstractExpr *rhs) { ctx.get_current_bb ().statements.emplace_back (lhs, rhs); @@ -199,14 +199,15 @@ protected: // Helpers to add BIR nodes std::initializer_list destinations = {}) { auto copy = make_arg (switch_val); - ctx.get_current_bb ().statements.emplace_back (Node::Kind::SWITCH, copy); + ctx.get_current_bb ().statements.emplace_back (Statement::Kind::SWITCH, + copy); ctx.get_current_bb ().successors.insert ( ctx.get_current_bb ().successors.end (), destinations); } void push_goto (BasicBlockId bb) { - ctx.get_current_bb ().statements.emplace_back (Node::Kind::GOTO); + ctx.get_current_bb ().statements.emplace_back (Statement::Kind::GOTO); if (bb != INVALID_BB) // INVALID_BB means the goto will be resolved later. ctx.get_current_bb ().successors.push_back (bb); } diff --git a/gcc/rust/checks/errors/borrowck/rust-bir-builder.h b/gcc/rust/checks/errors/borrowck/rust-bir-builder.h index 509929bc684..9bed96c660f 100644 --- a/gcc/rust/checks/errors/borrowck/rust-bir-builder.h +++ b/gcc/rust/checks/errors/borrowck/rust-bir-builder.h @@ -77,13 +77,13 @@ private: if (body.has_expr () && !lookup_type (body)->is_unit ()) { push_assignment (RETURN_VALUE_PLACE, translated); - ctx.get_current_bb ().statements.emplace_back (Node::Kind::RETURN); + ctx.get_current_bb ().statements.emplace_back (Statement::Kind::RETURN); } else if (!ctx.get_current_bb ().is_terminated ()) { push_assignment (RETURN_VALUE_PLACE, ctx.place_db.get_constant (lookup_type (body))); - ctx.get_current_bb ().statements.emplace_back (Node::Kind::RETURN); + ctx.get_current_bb ().statements.emplace_back (Statement::Kind::RETURN); } }; }; diff --git a/gcc/rust/checks/errors/borrowck/rust-bir-dump.cc b/gcc/rust/checks/errors/borrowck/rust-bir-dump.cc index 3e49bc76933..3684ad7b889 100644 --- a/gcc/rust/checks/errors/borrowck/rust-bir-dump.cc +++ b/gcc/rust/checks/errors/borrowck/rust-bir-dump.cc @@ -135,20 +135,21 @@ Dump::go (bool enable_simplify_cfg) } // Print BBs. - for (node_bb = 0; node_bb < func.basic_blocks.size (); ++node_bb) + for (statement_bb = 0; statement_bb < func.basic_blocks.size (); + ++statement_bb) { - if (bb_fold_map[node_bb] != node_bb) + if (bb_fold_map[statement_bb] != statement_bb) continue; // This BB was folded. - if (func.basic_blocks[node_bb].statements.empty () - && func.basic_blocks[node_bb].successors.empty ()) + if (func.basic_blocks[statement_bb].statements.empty () + && func.basic_blocks[statement_bb].successors.empty ()) continue; bb_terminated = false; - BasicBlock &bb = func.basic_blocks[node_bb]; + BasicBlock &bb = func.basic_blocks[statement_bb]; stream << "\n"; - stream << indentation << "bb" << bb_fold_map[node_bb] << ": {\n"; + stream << indentation << "bb" << bb_fold_map[statement_bb] << ": {\n"; for (auto &stmt : bb.statements) { stream << indentation << indentation; @@ -166,49 +167,49 @@ Dump::go (bool enable_simplify_cfg) stream << "}\n"; } void -Dump::visit (Node &node) +Dump::visit (Statement &stmt) { - node_place = node.get_place (); - switch (node.get_kind ()) + statement_place = stmt.get_place (); + switch (stmt.get_kind ()) { - case Node::Kind::ASSIGNMENT: { - visit_place (node.get_place ()); + case Statement::Kind::ASSIGNMENT: { + visit_place (stmt.get_place ()); stream << " = "; - node.get_expr ().accept_vis (*this); + stmt.get_expr ().accept_vis (*this); break; } - case Node::Kind::SWITCH: + case Statement::Kind::SWITCH: stream << "switchInt("; - visit_move_place (node.get_place ()); + visit_move_place (stmt.get_place ()); stream << ") -> ["; - print_comma_separated (stream, func.basic_blocks[node_bb].successors, + print_comma_separated (stream, func.basic_blocks[statement_bb].successors, [this] (BasicBlockId succ) { stream << "bb" << bb_fold_map[succ]; }); stream << "]"; bb_terminated = true; break; - case Node::Kind::RETURN: + case Statement::Kind::RETURN: stream << "return"; bb_terminated = true; break; - case Node::Kind::GOTO: + case Statement::Kind::GOTO: stream << "goto -> bb" - << bb_fold_map[func.basic_blocks[node_bb].successors.at (0)]; + << bb_fold_map[func.basic_blocks[statement_bb].successors.at (0)]; bb_terminated = true; break; - case Node::Kind::STORAGE_DEAD: + case Statement::Kind::STORAGE_DEAD: stream << "StorageDead("; - visit_move_place (node.get_place ()); + visit_move_place (stmt.get_place ()); stream << ")"; break; - case Node::Kind::STORAGE_LIVE: + case Statement::Kind::STORAGE_LIVE: stream << "StorageLive("; - visit_move_place (node.get_place ()); + visit_move_place (stmt.get_place ()); stream << ")"; break; } - node_place = INVALID_PLACE; + statement_place = INVALID_PLACE; } void @@ -261,7 +262,7 @@ void Dump::visit (BorrowExpr &expr) { stream << "&"; - visit_lifetime (node_place); + visit_lifetime (statement_place); visit_place (expr.get_place ()); } @@ -307,7 +308,7 @@ Dump::visit (CallExpr &expr) visit_move_place (place_id); }); stream << ") -> ["; - print_comma_separated (stream, func.basic_blocks[node_bb].successors, + print_comma_separated (stream, func.basic_blocks[statement_bb].successors, [this] (BasicBlockId succ) { stream << "bb" << bb_fold_map[succ]; }); diff --git a/gcc/rust/checks/errors/borrowck/rust-bir-dump.h b/gcc/rust/checks/errors/borrowck/rust-bir-dump.h index b6407a8528a..7ee94d749e3 100644 --- a/gcc/rust/checks/errors/borrowck/rust-bir-dump.h +++ b/gcc/rust/checks/errors/borrowck/rust-bir-dump.h @@ -37,8 +37,8 @@ class Dump : public Visitor std::vector bb_fold_map; std::vector place_map; - PlaceId node_place = INVALID_PLACE; - BasicBlockId node_bb = INVALID_BB; + PlaceId statement_place = INVALID_PLACE; + BasicBlockId statement_bb = INVALID_BB; bool bb_terminated = false; public: @@ -49,7 +49,7 @@ public: void go (bool enable_simplify_cfg = false); protected: - void visit (Node &node) override; + void visit (Statement &stmt) override; void visit_place (PlaceId place_id); void visit_move_place (PlaceId place_id); void visit (BorrowExpr &expr) override; diff --git a/gcc/rust/checks/errors/borrowck/rust-bir-visitor.h b/gcc/rust/checks/errors/borrowck/rust-bir-visitor.h index 8c6053d2362..0b3a4bddbec 100644 --- a/gcc/rust/checks/errors/borrowck/rust-bir-visitor.h +++ b/gcc/rust/checks/errors/borrowck/rust-bir-visitor.h @@ -22,7 +22,7 @@ namespace Rust { namespace BIR { -class Node; +class Statement; class InitializerExpr; template class Operator; class Assignment; @@ -32,7 +32,7 @@ class CallExpr; class Visitor { public: - virtual void visit (Node &node) = 0; + virtual void visit (Statement &stmt) = 0; virtual void visit (InitializerExpr &expr) = 0; virtual void visit (Operator<1> &expr) = 0; virtual void visit (Operator<2> &expr) = 0; diff --git a/gcc/rust/checks/errors/borrowck/rust-bir.h b/gcc/rust/checks/errors/borrowck/rust-bir.h index aa97eac17b4..746b2dc7e38 100644 --- a/gcc/rust/checks/errors/borrowck/rust-bir.h +++ b/gcc/rust/checks/errors/borrowck/rust-bir.h @@ -27,23 +27,23 @@ namespace Rust { namespace BIR { struct BasicBlock; -class Node; +class Statement; class AbstractExpr; /** * Top-level entity of the Borrow-checker IR (BIR). - * It represents a single function (method, closure, etc.), which is also the - * basic unit of Polonius borrow-checking. + * It represents a single function (method, closure, etc.), which is the + * basic unit of borrow-checking. */ struct Function { PlaceDB place_db; - std::vector arguments; // Only used for dump. + std::vector arguments; std::vector basic_blocks; }; -/** Single "instruction" of BIR. */ -class Node +/** Single statement of BIR. */ +class Statement { public: enum class Kind @@ -68,12 +68,12 @@ private: std::unique_ptr expr; public: - Node (PlaceId lhs, AbstractExpr *rhs) + Statement (PlaceId lhs, AbstractExpr *rhs) : kind (Kind::ASSIGNMENT), place (lhs), expr (rhs) {} - explicit Node (Kind kind, PlaceId place = INVALID_PLACE, - AbstractExpr *expr = nullptr) + explicit Statement (Kind kind, PlaceId place = INVALID_PLACE, + AbstractExpr *expr = nullptr) : kind (kind), place (place), expr (expr) {} @@ -92,7 +92,7 @@ static constexpr BasicBlockId INVALID_BB struct BasicBlock { // BIR "instructions". - std::vector statements; + std::vector statements; // A basic block can end with: goto, return or switch std::vector successors; @@ -103,9 +103,9 @@ public: return false; switch (statements.back ().get_kind ()) { - case Node::Kind::GOTO: - case Node::Kind::RETURN: - case Node::Kind::SWITCH: + case Statement::Kind::GOTO: + case Statement::Kind::RETURN: + case Statement::Kind::SWITCH: return true; default: return false; @@ -115,11 +115,11 @@ public: WARN_UNUSED_RESULT bool is_goto_terminated () const { return is_terminated () - && statements.back ().get_kind () == Node::Kind::GOTO; + && statements.back ().get_kind () == Statement::Kind::GOTO; } }; -// Rhs expression of BIR assignment node (abstract). +// Rhs expression of BIR assignment statements (abstract). class AbstractExpr : public Visitable { }; @@ -163,8 +163,8 @@ public: }; /** - * This expression is only to be used inside the assignment node and acts as - * identity wrapper for a place value. It is separated from `Operator<1>` to + * This expression is only to be used inside the assignment statement and acts + * as identity wrapper for a place value. It is separated from `Operator<1>` to * render it more explicitly in the dump. */ class Assignment : public VisitableImpl