Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
8254575: C2: Clean up unused TRACK_PHI_INPUTS assertion code
Remove assertion code that was disabled in all build configurations.

Co-authored-by: Vladimir Ivanov <vlivanov@openjdk.org>
Reviewed-by: vlivanov, kvn
  • Loading branch information
2 people authored and TobiHartmann committed Oct 14, 2020
1 parent 31d9b7f commit 9fe9b24
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions src/hotspot/share/opto/gcm.cpp
Expand Up @@ -610,16 +610,6 @@ Block* PhaseCFG::insert_anti_dependences(Block* LCA, Node* load, bool verify) {
Node_List non_early_stores(area); // all relevant stores outside of early
bool must_raise_LCA = false;

#ifdef TRACK_PHI_INPUTS
// %%% This extra checking fails because MergeMem nodes are not GVNed.
// Provide "phi_inputs" to check if every input to a PhiNode is from the
// original memory state. This indicates a PhiNode for which should not
// prevent the load from sinking. For such a block, set_raise_LCA_mark
// may be overly conservative.
// Mechanism: count inputs seen for each Phi encountered in worklist_store.
DEBUG_ONLY(GrowableArray<uint> phi_inputs(area, C->unique(),0,0));
#endif

// 'load' uses some memory state; look for users of the same state.
// Recurse through MergeMem nodes to the stores that use them.

Expand Down Expand Up @@ -761,19 +751,6 @@ Block* PhaseCFG::insert_anti_dependences(Block* LCA, Node* load, bool verify) {
}
}
assert(found_match, "no worklist bug");
#ifdef TRACK_PHI_INPUTS
#ifdef ASSERT
// This assert asks about correct handling of PhiNodes, which may not
// have all input edges directly from 'mem'. See BugId 4621264
int num_mem_inputs = phi_inputs.at_grow(store->_idx,0) + 1;
// Increment by exactly one even if there are multiple copies of 'mem'
// coming into the phi, because we will run this block several times
// if there are several copies of 'mem'. (That's how DU iterators work.)
phi_inputs.at_put(store->_idx, num_mem_inputs);
assert(PhiNode::Input + num_mem_inputs < store->req(),
"Expect at least one phi input will not be from original memory state");
#endif //ASSERT
#endif //TRACK_PHI_INPUTS
} else if (store_block != early) {
// 'store' is between the current LCA and earliest possible block.
// Label its block, and decide later on how to raise the LCA
Expand Down

1 comment on commit 9fe9b24

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented on 9fe9b24 Oct 14, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.