Skip to content

Commit 5cb2317

Browse files
author
Daniel Lundén
committed
8351568: Improve source code documentation for PhaseCFG::insert_anti_dependences
Reviewed-by: rcastanedalo, chagedorn
1 parent 1d36f17 commit 5cb2317

File tree

7 files changed

+295
-152
lines changed

7 files changed

+295
-152
lines changed

src/hotspot/share/adlc/output_h.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1962,7 +1962,7 @@ void ArchDesc::declareClasses(FILE *fp) {
19621962
else if( instr->is_ideal_box() ) {
19631963
// BoxNode provides the address of a stack slot.
19641964
// Define its bottom type to be TypeRawPtr::BOTTOM instead of TypePtr::BOTTOM
1965-
// This prevent s insert_anti_dependencies from complaining. It will
1965+
// This prevents raise_above_anti_dependences from complaining. It will
19661966
// complain if it sees that the pointer base is TypePtr::BOTTOM since
19671967
// it doesn't understand what that might alias.
19681968
fprintf(fp," const Type *bottom_type() const { return TypeRawPtr::BOTTOM; } // Box?\n");

src/hotspot/share/opto/block.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ class Block : public CFGElement {
210210
uint _freg_pressure;
211211
uint _fhrp_index;
212212

213-
// Mark and visited bits for an LCA calculation in insert_anti_dependences.
213+
// Mark and visited bits for an LCA calculation in raise_above_anti_dependences.
214214
// Since they hold unique node indexes, they do not need reinitialization.
215215
node_idx_t _raise_LCA_mark;
216216
void set_raise_LCA_mark(node_idx_t x) { _raise_LCA_mark = x; }
@@ -487,10 +487,10 @@ class PhaseCFG : public Phase {
487487
// Used when building the CFG and creating end nodes for blocks.
488488
MachNode* _goto;
489489

490-
Block* insert_anti_dependences(Block* LCA, Node* load, bool verify = false);
490+
Block* raise_above_anti_dependences(Block* LCA, Node* load, bool verify = false);
491491
void verify_anti_dependences(Block* LCA, Node* load) const {
492492
assert(LCA == get_block_for_node(load), "should already be scheduled");
493-
const_cast<PhaseCFG*>(this)->insert_anti_dependences(LCA, load, true);
493+
const_cast<PhaseCFG*>(this)->raise_above_anti_dependences(LCA, load, true);
494494
}
495495

496496
bool move_to_next(Block* bx, uint b_index);

src/hotspot/share/opto/gcm.cpp

Lines changed: 285 additions & 142 deletions
Large diffs are not rendered by default.

src/hotspot/share/opto/lcm.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@ void PhaseCFG::implicit_null_check(Block* block, Node *proj, Node *val, int allo
491491
if (n->needs_anti_dependence_check() &&
492492
n->in(LoadNode::Memory) == best->in(StoreNode::Memory)) {
493493
// Found anti-dependent load
494-
insert_anti_dependences(block, n);
494+
raise_above_anti_dependences(block, n);
495495
if (C->failing()) {
496496
return;
497497
}
@@ -1363,7 +1363,7 @@ void PhaseCFG::call_catch_cleanup(Block* block) {
13631363
sb->insert_node(clone, 1);
13641364
map_node_to_block(clone, sb);
13651365
if (clone->needs_anti_dependence_check()) {
1366-
insert_anti_dependences(sb, clone);
1366+
raise_above_anti_dependences(sb, clone);
13671367
if (C->failing()) {
13681368
return;
13691369
}

test/hotspot/jtreg/compiler/codegen/TestAntiDependenciesHighMemUsage.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
/*
2525
* @test
2626
* @bug 8333258
27-
* @summary C2: high memory usage in PhaseCFG::insert_anti_dependences()
27+
* @summary C2: high memory usage in PhaseCFG::raise_above_anti_dependences()
2828
* @run main/othervm -XX:CompileOnly=TestAntiDependenciesHighMemUsage::test1 -Xcomp TestAntiDependenciesHighMemUsage
2929
*/
3030

test/hotspot/jtreg/compiler/codegen/TestAntiDependenciesHighMemUsage2.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
/*
2525
* @test
2626
* @bug 8333258
27-
* @summary C2: high memory usage in PhaseCFG::insert_anti_dependences()
27+
* @summary C2: high memory usage in PhaseCFG::raise_above_anti_dependences()
2828
* @run main/othervm -XX:CompileOnly=TestAntiDependenciesHighMemUsage2::test1 -XX:-ClipInlining
2929
* -XX:-BackgroundCompilation -XX:-TieredCompilation -XX:-UseOnStackReplacement TestAntiDependenciesHighMemUsage2
3030
*/

test/hotspot/jtreg/compiler/loopopts/TestSplitIfPinnedLoadInStripMinedLoop.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2020, 2021, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -138,7 +138,7 @@ int test3(MyClass obj1, MyClass obj2) {
138138
}
139139

140140
// Same as test2 but with reference to inner loop induction variable 'j' and different order of instructions.
141-
// Triggers an assert in PhaseCFG::insert_anti_dependences if loop strip mining verification is disabled:
141+
// Triggers an assert in PhaseCFG::raise_above_anti_dependences if loop strip mining verification is disabled:
142142
// assert(!LCA_orig->dominates(pred_block) || early->dominates(pred_block)) failed: early is high enough
143143
int test4(MyClass obj1, MyClass obj2) {
144144
for (int i = 0; i < 10; ++i) {

0 commit comments

Comments
 (0)