Mercurial > hg > graal-compiler
annotate src/share/vm/opto/live.hpp @ 18226:6eda3b299460
Record compilation dependencies with +LogCompilation
author | Tom Rodriguez <tom.rodriguez@oracle.com> |
---|---|
date | Fri, 31 Oct 2014 12:20:56 -0700 |
parents | 89152779163c |
children |
rev | line source |
---|---|
0 | 1 /* |
17524 | 2 * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. |
0 | 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * | |
5 * This code is free software; you can redistribute it and/or modify it | |
6 * under the terms of the GNU General Public License version 2 only, as | |
7 * published by the Free Software Foundation. | |
8 * | |
9 * This code is distributed in the hope that it will be useful, but WITHOUT | |
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
12 * version 2 for more details (a copy is included in the LICENSE file that | |
13 * accompanied this code). | |
14 * | |
15 * You should have received a copy of the GNU General Public License version | |
16 * 2 along with this work; if not, write to the Free Software Foundation, | |
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | |
18 * | |
1552
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
0
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
0
diff
changeset
|
20 * or visit www.oracle.com if you need additional information or have any |
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
0
diff
changeset
|
21 * questions. |
0 | 22 * |
23 */ | |
24 | |
1972 | 25 #ifndef SHARE_VM_OPTO_LIVE_HPP |
26 #define SHARE_VM_OPTO_LIVE_HPP | |
27 | |
28 #include "libadt/port.hpp" | |
29 #include "libadt/vectset.hpp" | |
30 #include "opto/block.hpp" | |
31 #include "opto/indexSet.hpp" | |
32 #include "opto/phase.hpp" | |
33 #include "opto/regmask.hpp" | |
34 | |
0 | 35 class Block; |
36 class PhaseCFG; | |
37 class VectorSet; | |
38 class IndexSet; | |
39 | |
8728
056ab43544a4
8009721: Make PhaseLive independent from regalloc
neliasso
parents:
1972
diff
changeset
|
40 //------------------------------LRG_List--------------------------------------- |
056ab43544a4
8009721: Make PhaseLive independent from regalloc
neliasso
parents:
1972
diff
changeset
|
41 // Map Node indices to Live RanGe indices. |
056ab43544a4
8009721: Make PhaseLive independent from regalloc
neliasso
parents:
1972
diff
changeset
|
42 // Array lookup in the optimized case. |
12254
8c83625e3a53
8024646: Remove LRG_List container, replace it with GrowableArray
adlertz
parents:
10111
diff
changeset
|
43 typedef GrowableArray<uint> LRG_List; |
8728
056ab43544a4
8009721: Make PhaseLive independent from regalloc
neliasso
parents:
1972
diff
changeset
|
44 |
0 | 45 //------------------------------PhaseLive-------------------------------------- |
46 // Compute live-in/live-out | |
47 class PhaseLive : public Phase { | |
48 // Array of Sets of values live at the start of a block. | |
49 // Indexed by block pre-order number. | |
50 IndexSet *_live; | |
51 | |
52 // Array of Sets of values defined locally in the block | |
53 // Indexed by block pre-order number. | |
54 IndexSet *_defs; | |
55 | |
56 // Array of delta-set pointers, indexed by block pre-order number | |
57 IndexSet **_deltas; | |
58 IndexSet *_free_IndexSet; // Free list of same | |
59 | |
60 Block_List *_worklist; // Worklist for iterative solution | |
61 | |
62 const PhaseCFG &_cfg; // Basic blocks | |
10111 | 63 const LRG_List &_names; // Mapping from Nodes to live ranges |
0 | 64 uint _maxlrg; // Largest live-range number |
65 Arena *_arena; | |
66 | |
67 IndexSet *getset( Block *p ); | |
68 IndexSet *getfreeset( ); | |
69 void freeset( const Block *p ); | |
70 void add_liveout( Block *p, uint r, VectorSet &first_pass ); | |
71 void add_liveout( Block *p, IndexSet *lo, VectorSet &first_pass ); | |
72 | |
73 public: | |
10111 | 74 PhaseLive(const PhaseCFG &cfg, const LRG_List &names, Arena *arena); |
0 | 75 ~PhaseLive() {} |
76 // Compute liveness info | |
77 void compute(uint maxlrg); | |
78 // Reset arena storage | |
79 void reset() { _live = NULL; } | |
80 | |
81 // Return the live-out set for this block | |
82 IndexSet *live( const Block * b ) { return &_live[b->_pre_order-1]; } | |
83 | |
84 #ifndef PRODUCT | |
85 void dump( const Block *b ) const; | |
86 void stats(uint iters) const; | |
87 #endif | |
88 }; | |
1972 | 89 |
90 #endif // SHARE_VM_OPTO_LIVE_HPP |