src/share/vm/opto/compile.hpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File
7092905 Cdiff src/share/vm/opto/compile.hpp
src/share/vm/opto/compile.hpp
Print this page
*** 73,82 ****
--- 73,84 ----
class TypePtr;
class TypeFunc;
class Unique_Node_List;
class nmethod;
class WarmCallInfo;
+ class Node_Stack;
+ struct Final_Reshape_Counts;
//------------------------------Compile----------------------------------------
// This class defines a top-level Compiler invocation.
class Compile : public Phase {
*** 96,105 ****
--- 98,109 ----
// (The time collection itself is always conditionalized on TimeCompiler.)
class TracePhase : public TraceTime {
private:
Compile* C;
CompileLog* _log;
+ const char* _phase_name;
+ bool _dolog;
public:
TracePhase(const char* name, elapsedTimer* accumulator, bool dolog);
~TracePhase();
};
*** 311,320 ****
--- 315,327 ----
IdealGraphPrinter* _printer;
#endif
// Node management
uint _unique; // Counter for unique Node indices
+ VectorSet _dead_node_list; // Set of dead nodes
+ uint _dead_node_count; // Number of dead nodes; VectorSet::Size() is O(N).
+ // So use this to keep count and make the call O(1).
debug_only(static int _debug_idx;) // Monotonic counter (not reset), use -XX:BreakAtNode=<idx>
Arena _node_arena; // Arena for new-space Nodes
Arena _old_arena; // Arena for old-space Nodes, lifetime during xform
RootNode* _root; // Unique root of compilation, or NULL after bail-out.
Node* _top; // Unique top node. (Reset by various phases.)
*** 547,557 ****
}
void record_method_not_compilable_all_tiers(const char* reason) {
record_method_not_compilable(reason, true);
}
bool check_node_count(uint margin, const char* reason) {
! if (unique() + margin > (uint)MaxNodeLimit) {
record_method_not_compilable(reason);
return true;
} else {
return false;
}
--- 554,564 ----
}
void record_method_not_compilable_all_tiers(const char* reason) {
record_method_not_compilable(reason, true);
}
bool check_node_count(uint margin, const char* reason) {
! if (live_nodes() + margin > (uint)MaxNodeLimit) {
record_method_not_compilable(reason);
return true;
} else {
return false;
}
*** 575,584 ****
--- 582,607 ----
Node* recent_alloc_obj() const { return _recent_alloc_obj; }
void set_recent_alloc(Node* ctl, Node* obj) {
_recent_alloc_ctl = ctl;
_recent_alloc_obj = obj;
}
+ void record_dead_node(uint idx) { if (_dead_node_list.test_set(idx)) return;
+ _dead_node_count++;
+ }
+ uint dead_node_count() { return _dead_node_count; }
+ void reset_dead_node_list() { _dead_node_list.Reset();
+ _dead_node_count = 0;
+ }
+ uint live_nodes() {
+ int val = _unique - _dead_node_count;
+ assert (val >= 0, err_msg_res("number of tracked dead nodes %d more than created nodes %d", _unique, _dead_node_count));
+ return (uint) val;
+ }
+ #ifdef ASSERT
+ uint count_live_nodes_by_graph_walk();
+ void print_missing_nodes();
+ #endif
// Constant table
ConstantTable& constant_table() { return _constant_table; }
MachConstantBaseNode* mach_constant_base_node();
*** 676,685 ****
--- 699,709 ----
// record_for_igvn as needed.
void gvn_replace_by(Node* n, Node* nn);
void identify_useful_nodes(Unique_Node_List &useful);
+ void update_dead_node_list(Unique_Node_List &useful);
void remove_useless_nodes (Unique_Node_List &useful);
WarmCallInfo* warm_calls() const { return _warm_calls; }
void set_warm_calls(WarmCallInfo* l) { _warm_calls = l; }
WarmCallInfo* pop_warm_call();
*** 890,899 ****
--- 914,928 ----
#ifndef PRODUCT
static juint _intrinsic_hist_count[vmIntrinsics::ID_LIMIT];
static jubyte _intrinsic_hist_flags[vmIntrinsics::ID_LIMIT];
#endif
+ // Function calls made by the public function final_graph_reshaping.
+ // No need to be made public as they are not called elsewhere.
+ void final_graph_reshaping_impl( Node *n, Final_Reshape_Counts &frc);
+ void final_graph_reshaping_walk( Node_Stack &nstack, Node *root, Final_Reshape_Counts &frc );
+ void eliminate_redundant_card_marks(Node* n);
public:
// Note: Histogram array size is about 1 Kb.
enum { // flag bits:
src/share/vm/opto/compile.hpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File