RFR: 8252583: Make PhiNode::is_copy() debug only

Nils Eliasson neliasso at openjdk.java.net
Mon Sep 21 07:33:03 UTC 2020


On Mon, 21 Sep 2020 06:27:41 GMT, Roberto Castañeda Lozano <github.com+8792647+robcasloz at openjdk.org> wrote:

> Convert `PhiNode::is_copy()` into an actual, debug-only predicate. Replace calls to `is_copy()` from non-debug code
> with explicit assertions. Remove dead loop in debug-only `MergeMemStream::match_memory()`.

Changes requested by neliasso (Reviewer).

src/hotspot/share/opto/addnode.cpp line 104:

> 102:     assert(!in2->as_Phi()->is_copy(), "in2 cannot be a copy");
> 103: #endif
> 104:   if( in2->is_Phi() && (phi = in2->as_Phi()) && phi->region()->is_Loop() && phi->in(2)==add){

Since the row is touched - please add whitespace where its missing:
"phi->in(2)==add" -> "phi->in(2) == add"

src/hotspot/share/opto/addnode.cpp line 98:

> 96:     assert(!in1->as_Phi()->is_copy(), "in1 cannot be a copy");
> 97: #endif
> 98:   if( in1->is_Phi() && (phi = in1->as_Phi()) && phi->region()->is_Loop() && phi->in(2)==add)

Since the row is touched - please add whitespace where its missing.
"phi->in(2)==add" -> "phi->in(2) == add"

-------------

PR: https://git.openjdk.java.net/jdk/pull/275


More information about the hotspot-compiler-dev mailing list