mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-23 04:24:49 +02:00
6810845: Performance regression in mpegaudio on x64
Used the outer loop frequency in frequencies checks in RA. Reviewed-by: never, twisti
This commit is contained in:
parent
3b786f8edc
commit
68cf08d2c3
7 changed files with 30 additions and 4 deletions
|
@ -1374,6 +1374,9 @@ void PhaseCFG::Estimate_Block_Frequency() {
|
|||
_root_loop->_freq = 1.0;
|
||||
_root_loop->scale_freq();
|
||||
|
||||
// Save outmost loop frequency for LRG frequency threshold
|
||||
_outer_loop_freq = _root_loop->outer_loop_freq();
|
||||
|
||||
// force paths ending at uncommon traps to be infrequent
|
||||
if (!C->do_freq_based_layout()) {
|
||||
Block_List worklist;
|
||||
|
@ -1898,6 +1901,7 @@ bool CFGLoop::in_loop_nest(Block* b) {
|
|||
// Do a top down traversal of loop tree (visit outer loops first.)
|
||||
void CFGLoop::scale_freq() {
|
||||
float loop_freq = _freq * trip_count();
|
||||
_freq = loop_freq;
|
||||
for (int i = 0; i < _members.length(); i++) {
|
||||
CFGElement* s = _members.at(i);
|
||||
float block_freq = s->_freq * loop_freq;
|
||||
|
@ -1912,6 +1916,14 @@ void CFGLoop::scale_freq() {
|
|||
}
|
||||
}
|
||||
|
||||
// Frequency of outer loop
|
||||
float CFGLoop::outer_loop_freq() const {
|
||||
if (_child != NULL) {
|
||||
return _child->_freq;
|
||||
}
|
||||
return _freq;
|
||||
}
|
||||
|
||||
#ifndef PRODUCT
|
||||
//------------------------------dump_tree--------------------------------------
|
||||
void CFGLoop::dump_tree() const {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue