8279956: Useless method Scheduling::ComputeLocalLatenciesForward()
Reviewed-by: jiefu, neliasso
This commit is contained in:
parent
4f4da3b172
commit
4eb4f94db0
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1998, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1998, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -96,10 +96,6 @@ private:
|
||||
// Free list for pinch nodes.
|
||||
Node_List _pinch_free_list;
|
||||
|
||||
// Latency from the beginning of the containing basic block (base 1)
|
||||
// for each node.
|
||||
unsigned short *_node_latency;
|
||||
|
||||
// Number of uses of this node within the containing basic block.
|
||||
short *_uses;
|
||||
|
||||
@ -162,10 +158,6 @@ public:
|
||||
// Do the scheduling
|
||||
void DoScheduling();
|
||||
|
||||
// Compute the local latencies walking forward over the list of
|
||||
// nodes for a basic block
|
||||
void ComputeLocalLatenciesForward(const Block *bb);
|
||||
|
||||
// Compute the register antidependencies within a basic block
|
||||
void ComputeRegisterAntidependencies(Block *bb);
|
||||
void verify_do_def( Node *n, OptoReg::Name def, const char *msg );
|
||||
@ -2027,7 +2019,6 @@ Scheduling::Scheduling(Arena *arena, Compile &compile)
|
||||
_node_bundling_base = NEW_ARENA_ARRAY(compile.comp_arena(), Bundle, node_max);
|
||||
|
||||
// Allocate space for fixed-size arrays
|
||||
_node_latency = NEW_ARENA_ARRAY(arena, unsigned short, node_max);
|
||||
_uses = NEW_ARENA_ARRAY(arena, short, node_max);
|
||||
_current_latency = NEW_ARENA_ARRAY(arena, unsigned short, node_max);
|
||||
|
||||
@ -2035,7 +2026,6 @@ Scheduling::Scheduling(Arena *arena, Compile &compile)
|
||||
for (uint i = 0; i < node_max; i++) {
|
||||
::new (&_node_bundling_base[i]) Bundle();
|
||||
}
|
||||
memset(_node_latency, 0, node_max * sizeof(unsigned short));
|
||||
memset(_uses, 0, node_max * sizeof(short));
|
||||
memset(_current_latency, 0, node_max * sizeof(unsigned short));
|
||||
|
||||
@ -2141,54 +2131,6 @@ void PhaseOutput::ScheduleAndBundle() {
|
||||
#endif
|
||||
}
|
||||
|
||||
// Compute the latency of all the instructions. This is fairly simple,
|
||||
// because we already have a legal ordering. Walk over the instructions
|
||||
// from first to last, and compute the latency of the instruction based
|
||||
// on the latency of the preceding instruction(s).
|
||||
void Scheduling::ComputeLocalLatenciesForward(const Block *bb) {
|
||||
#ifndef PRODUCT
|
||||
if (_cfg->C->trace_opto_output())
|
||||
tty->print("# -> ComputeLocalLatenciesForward\n");
|
||||
#endif
|
||||
|
||||
// Walk over all the schedulable instructions
|
||||
for( uint j=_bb_start; j < _bb_end; j++ ) {
|
||||
|
||||
// This is a kludge, forcing all latency calculations to start at 1.
|
||||
// Used to allow latency 0 to force an instruction to the beginning
|
||||
// of the bb
|
||||
uint latency = 1;
|
||||
Node *use = bb->get_node(j);
|
||||
uint nlen = use->len();
|
||||
|
||||
// Walk over all the inputs
|
||||
for ( uint k=0; k < nlen; k++ ) {
|
||||
Node *def = use->in(k);
|
||||
if (!def)
|
||||
continue;
|
||||
|
||||
uint l = _node_latency[def->_idx] + use->latency(k);
|
||||
if (latency < l)
|
||||
latency = l;
|
||||
}
|
||||
|
||||
_node_latency[use->_idx] = latency;
|
||||
|
||||
#ifndef PRODUCT
|
||||
if (_cfg->C->trace_opto_output()) {
|
||||
tty->print("# latency %4d: ", latency);
|
||||
use->dump();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifndef PRODUCT
|
||||
if (_cfg->C->trace_opto_output())
|
||||
tty->print("# <- ComputeLocalLatenciesForward\n");
|
||||
#endif
|
||||
|
||||
} // end ComputeLocalLatenciesForward
|
||||
|
||||
// See if this node fits into the present instruction bundle
|
||||
bool Scheduling::NodeFitsInBundle(Node *n) {
|
||||
uint n_idx = n->_idx;
|
||||
@ -2764,9 +2706,6 @@ void Scheduling::DoScheduling() {
|
||||
ComputeRegisterAntidependencies(bb);
|
||||
if (C->failing()) return; // too many D-U pinch points
|
||||
|
||||
// Compute intra-bb latencies for the nodes
|
||||
ComputeLocalLatenciesForward(bb);
|
||||
|
||||
// Compute the usage within the block, and set the list of all nodes
|
||||
// in the block that have no uses within the block.
|
||||
ComputeUseCount(bb);
|
||||
|
Loading…
x
Reference in New Issue
Block a user