src/share/vm/opto/block.hpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
*** old/src/share/vm/opto/block.hpp Wed Feb 19 12:01:33 2014
--- new/src/share/vm/opto/block.hpp Wed Feb 19 12:01:33 2014
*** 88,100 ****
--- 88,100 ----
class CFGElement : public ResourceObj {
friend class VMStructs;
public:
! float _freq; // Execution frequency (estimate)
! double _freq; // Execution frequency (estimate)
- CFGElement() : _freq(0.0f) {}
virtual bool is_block() { return false; }
virtual bool is_loop() { return false; }
Block* as_Block() { assert(is_block(), "must be block"); return (Block*)this; }
CFGLoop* as_CFGLoop() { assert(is_loop(), "must be loop"); return (CFGLoop*)this; }
};
*** 200,210 ****
--- 200,210 ----
uint compute_loop_alignment();
// BLOCK_FREQUENCY is a sentinel to mark uses of constant block frequencies.
// It is currently also used to scale such frequencies relative to
// FreqCountInvocations relative to the old value of 1500.
! #define BLOCK_FREQUENCY(f) ((f * (float) 1500) / FreqCountInvocations)
! #define BLOCK_FREQUENCY(f) ((f * (double) 1500) / FreqCountInvocations)
// Register Pressure (estimate) for Splitting heuristic
uint _reg_pressure;
uint _ihrp_index;
uint _freg_pressure;
*** 391,401 ****
--- 391,401 ----
// Loop from the root
CFGLoop* _root_loop;
// Outmost loop frequency
! float _outer_loop_frequency;
! double _outer_loop_frequency;
// Per node latency estimation, valid only during GCM
GrowableArray<uint>* _node_latency;
// Build a proper looking cfg. Return count of basic blocks
*** 506,516 ****
--- 506,516 ----
uint get_latency_for_node(Node* node) {
return _node_latency->at_grow(node->_idx);
}
// Get the outer most frequency
! float get_outer_loop_frequency() const {
! double get_outer_loop_frequency() const {
return _outer_loop_frequency;
}
// Get the root node of the CFG
RootNode* get_root_node() const {
*** 654,670 ****
--- 654,670 ----
//----------------------------BlockProbPair---------------------------
// Ordered pair of Node*.
class BlockProbPair VALUE_OBJ_CLASS_SPEC {
protected:
Block* _target; // block target
! float _prob; // probability of edge to block
! double _prob; // probability of edge to block
public:
BlockProbPair() : _target(NULL), _prob(0.0) {}
! BlockProbPair(Block* b, float p) : _target(b), _prob(p) {}
! BlockProbPair(Block* b, double p) : _target(b), _prob(p) {}
Block* get_target() const { return _target; }
! float get_prob() const { return _prob; }
! double get_prob() const { return _prob; }
};
//------------------------------CFGLoop-------------------------------------------
class CFGLoop : public CFGElement {
friend class VMStructs;
*** 673,684 ****
--- 673,684 ----
CFGLoop *_parent; // root of loop tree is the method level "pseudo" loop, it's parent is null
CFGLoop *_sibling; // null terminated list
CFGLoop *_child; // first child, use child's sibling to visit all immediately nested loops
GrowableArray<CFGElement*> _members; // list of members of loop
GrowableArray<BlockProbPair> _exits; // list of successor blocks and their probabilities
! float _exit_prob; // probability any loop exit is taken on a single loop iteration
! void update_succ_freq(Block* b, float freq);
! double _exit_prob; // probability any loop exit is taken on a single loop iteration
! void update_succ_freq(Block* b, double freq);
public:
CFGLoop(int id) :
CFGElement(),
_id(id),
*** 700,712 ****
--- 700,712 ----
}
Block* backedge_block(); // Return the block on the backedge of the loop (else NULL)
void compute_loop_depth(int depth);
void compute_freq(); // compute frequency with loop assuming head freq 1.0f
void scale_freq(); // scale frequency by loop trip count (including outer loops)
! float outer_loop_freq() const; // frequency of outer loop
! double outer_loop_freq() const; // frequency of outer loop
bool in_loop_nest(Block* b);
! float trip_count() const { return 1.0f / _exit_prob; }
! double trip_count() const { return 1.0 / _exit_prob; }
virtual bool is_loop() { return true; }
int id() { return _id; }
#ifndef PRODUCT
void dump( ) const;
*** 721,731 ****
--- 721,731 ----
class CFGEdge : public ResourceObj {
friend class VMStructs;
private:
Block * _from; // Source basic block
Block * _to; // Destination basic block
! float _freq; // Execution frequency (estimate)
! double _freq; // Execution frequency (estimate)
int _state;
bool _infrequent;
int _from_pct;
int _to_pct;
*** 740,756 ****
--- 740,756 ----
open, // initial edge state; unprocessed
connected, // edge used to connect two traces together
interior // edge is interior to trace (could be backedge)
};
! CFGEdge(Block *from, Block *to, float freq, int from_pct, int to_pct) :
! CFGEdge(Block *from, Block *to, double freq, int from_pct, int to_pct) :
_from(from), _to(to), _freq(freq),
_from_pct(from_pct), _to_pct(to_pct), _state(open) {
_infrequent = from_infrequent() || to_infrequent();
}
! float freq() const { return _freq; }
! double freq() const { return _freq; }
Block* from() const { return _from; }
Block* to () const { return _to; }
int infrequent() const { return _infrequent; }
int state() const { return _state; }
src/share/vm/opto/block.hpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File