[8u-dev] Request for approval: Backport of 8011858
Vlad Ureche
vlad.ureche at gmail.com
Tue Sep 15 15:33:40 UTC 2015
On Tue, Sep 15, 2015 at 3:54 PM, Zoltán Majó <zoltan.majo at oracle.com> wrote:
>
> 1) in matcher.cpp on line 345 for determining the stack size used in
> xform();
> 2) in compile.cpp on line 330 for the estimated worklist size.
Zoltán, sorry for not catching those two cases on the original patch.
Here are the notes I took back then, although line numbers may have shifted:
* hotspot/src/share/vm/opto/cfgnode.cpp:
o 805: Node_Stack Node_Stack stack(a, C->unique() >> 4); =>
*C->live_nodes() >> 4*
* hotspot/src/share/vm/opto/chaitin.cpp:
o 1795: Node **derived_base_map =
(Node**)a->Amalloc(sizeof(Node*)*C->unique()); => *needs all indices for
PhaseChaitin::find_base_for_derived*
* hotspot/src/share/vm/opto/compile.cpp:
o 320: int estimated_worklist_size = unique(); => *int
estimated_worklist_size = live_nodes();*
o 3314: Node_Stack nstack(unique() >> 1); => *Node_Stack
nstack(live_nodes() >> 1);*
* hotspot/src/share/vm/opto/domgraph.cpp:
o 393: *leave unique() alone, since the algorithms rely on indices*
* hotspot/src/share/vm/opto/escape.cpp:
o 41: _nodes(C->comp_arena(), C->unique(), C->unique(), NULL) =>
*leave it alone, nodes are accessed by index*
* hotspot/src/share/vm/opto/gcm.cpp:
o 111: GrowableArray <Node *> spstack(C->unique() + 8); =>
*GrowableArray <Node *> spstack(C->live_nodes() + 8);*
o 1313: stack.map((C->unique() >> 1) + 16, NULL); =>
*stack.map((C->live_nodes() >> 1) + 16, NULL);*
o 1374: GrowableArray ready_cnt(C->unique(), C->unique(), -1); =>
*leave it, it requires index-based access*
* hotspot/src/share/vm/opto/loopnode.cpp:
o 2128: _nodes.map(C->unique(), NULL); => *leave it, it requires
index-based access*
o 2203: _idom = NEW_RESOURCE_ARRAY( Node*, _idom_size ); =>
*leave it, it requires index-based access*
o 2234: int stack_size = (C->unique() >> 1) + 16; // (unique>>1)+16
from Java2D stats => *int stack_size =
(C->live_nodes() >> 1) + 16*
o 2690: uint init_size = C->unique() / 100; => *uint init_size =
C->live_nodes() / 100;*
o 2781: GrowableArray <Node *> bltstack(C->unique() >> 1);**=>
*GrowableArray <Node *> bltstack(C->live_nodes() >> 1);*
o 3671: Node_Stack stack(arena, C->unique() >> 2)**=> *Node_Stack
stack(arena, C->live_nodes() >> 2);*
* hotspot/src/share/vm/opto/loopnode.hpp:
o 521: _max_preorder = C->unique()+8; => *I don't understand why +8,
since indexing occurs based on node indices :|*
o other occurences are similar
* hotspot/src/share/vm/opto/loopTransform.cpp:
o 1216: Node_Stack stack(arena, C->unique() >> 2); => *Node_Stack
stack(arena, C->live_nodes() >> 2);*
* hotspot/src/share/vm/opto/matcher.cpp:
o 326: grow_new_node_array(C->unique()); => *leave alone, indexing
based on nodes*
o 2053: MStack mstack(C->unique() * 2);=> *this can probably be
optimized as well, I guess*
* hotspot/src/share/vm/opto/node.cpp:
o 1771: GrowableArray <Node *> nstack(C->unique()); => *GrowableArray
<Node *> nstack(C->live_nodes());*
* hotspot/src/share/vm/opto/phaseX.cpp:
o 461,477: _types.map(C->unique(), NULL); => *leave alone,
index-based access occurs later*
o 794,811: _stack(C->unique() >> 1), => *_stack(C->live_nodes() >>
1),*
o 1641: GrowableArray <Node *> trstack(C->unique() >> 1); =>
*GrowableArray <Node *> trstack(C->live_nodes() >> 1);*
Hope this is of use for you!
Vlad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20150915/ba54c6c4/attachment.html>
More information about the hotspot-compiler-dev
mailing list