[ir] Remove IsConnected
This CL removes IsConnected as it isn't useful anymore.
Bug: tint:1718
Change-Id: I12b32879e87925e8a2faf0e48e9d23114a2aa484
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/134304
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Reviewed-by: James Price <jrprice@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
diff --git a/src/tint/ir/block.h b/src/tint/ir/block.h
index dc0f596..597ff2c 100644
--- a/src/tint/ir/block.h
+++ b/src/tint/ir/block.h
@@ -77,9 +77,6 @@
/// @returns the params to the block
utils::Vector<const BlockParam*, 0>& Params() { return params_; }
- /// @returns true if this node has inbound branches and branches out
- bool IsConnected() const { return HasBranchTarget(); }
-
/// @returns the inbound branch list for the block
utils::VectorRef<ir::Branch*> InboundBranches() const { return inbound_branches_; }
diff --git a/src/tint/ir/disassembler.cc b/src/tint/ir/disassembler.cc
index 3001258..a0edd21 100644
--- a/src/tint/ir/disassembler.cc
+++ b/src/tint/ir/disassembler.cc
@@ -327,7 +327,7 @@
}
out_ << "f: %fn" << IdOf(i->False());
}
- if (i->Merge()->IsConnected()) {
+ if (i->Merge()->HasBranchTarget()) {
out_ << ", m: %fn" << IdOf(i->Merge());
}
out_ << "]" << std::endl;
@@ -342,7 +342,7 @@
Indent() << "# False block" << std::endl;
Walk(i->False());
}
- if (i->Merge()->IsConnected()) {
+ if (i->Merge()->HasBranchTarget()) {
Indent() << "# Merge block" << std::endl;
Walk(i->Merge());
}
@@ -351,10 +351,10 @@
void Disassembler::EmitLoop(const Loop* l) {
out_ << "loop [s: %fn" << IdOf(l->Start());
- if (l->Continuing()->IsConnected()) {
+ if (l->Continuing()->HasBranchTarget()) {
out_ << ", c: %fn" << IdOf(l->Continuing());
}
- if (l->Merge()->IsConnected()) {
+ if (l->Merge()->HasBranchTarget()) {
out_ << ", m: %fn" << IdOf(l->Merge());
}
out_ << "]" << std::endl;
@@ -364,12 +364,12 @@
Walk(l->Start());
}
- if (l->Continuing()->IsConnected()) {
+ if (l->Continuing()->HasBranchTarget()) {
ScopedIndent si(indent_size_);
Indent() << "# Continuing block" << std::endl;
Walk(l->Continuing());
}
- if (l->Merge()->IsConnected()) {
+ if (l->Merge()->HasBranchTarget()) {
Indent() << "# Merge block" << std::endl;
Walk(l->Merge());
}
@@ -397,7 +397,7 @@
}
out_ << ", %fn" << IdOf(c.Start()) << ")";
}
- if (s->Merge()->IsConnected()) {
+ if (s->Merge()->HasBranchTarget()) {
out_ << ", m: %fn" << IdOf(s->Merge());
}
out_ << "]" << std::endl;
@@ -407,7 +407,7 @@
Indent() << "# Case block" << std::endl;
Walk(c.Start());
}
- if (s->Merge()->IsConnected()) {
+ if (s->Merge()->HasBranchTarget()) {
Indent() << "# Merge block" << std::endl;
Walk(s->Merge());
}