author | iveresov |
Thu, 22 Jan 2015 11:25:23 -0800 | |
changeset 28723 | 0a36120cb225 |
parent 25930 | eae8b7490d2c |
child 46630 | 75aa3e39d02c |
permissions | -rw-r--r-- |
1 | 1 |
/* |
25930 | 2 |
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. |
1 | 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 |
* |
|
5547
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
3914
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
3914
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
3914
diff
changeset
|
21 |
* questions. |
1 | 22 |
* |
23 |
*/ |
|
24 |
||
7397 | 25 |
#include "precompiled.hpp" |
26 |
#include "memory/allocation.inline.hpp" |
|
27 |
#include "opto/addnode.hpp" |
|
28 |
#include "opto/compile.hpp" |
|
29 |
#include "opto/connode.hpp" |
|
30 |
#include "opto/machnode.hpp" |
|
31 |
#include "opto/matcher.hpp" |
|
32 |
#include "opto/memnode.hpp" |
|
33 |
#include "opto/phaseX.hpp" |
|
34 |
#include "opto/subnode.hpp" |
|
35 |
#include "runtime/sharedRuntime.hpp" |
|
1 | 36 |
|
7397 | 37 |
// Optimization - Graph Style |
1 | 38 |
|
39 |
//============================================================================= |
|
40 |
//------------------------------hash------------------------------------------- |
|
41 |
uint ConNode::hash() const { |
|
42 |
return (uintptr_t)in(TypeFunc::Control) + _type->hash(); |
|
43 |
} |
|
44 |
||
45 |
//------------------------------make------------------------------------------- |
|
25930 | 46 |
ConNode *ConNode::make(const Type *t) { |
1 | 47 |
switch( t->basic_type() ) { |
24923
9631f7d691dc
8034812: remove IDX_INIT macro hack in Node class
thartmann
parents:
23528
diff
changeset
|
48 |
case T_INT: return new ConINode( t->is_int() ); |
9631f7d691dc
8034812: remove IDX_INIT macro hack in Node class
thartmann
parents:
23528
diff
changeset
|
49 |
case T_LONG: return new ConLNode( t->is_long() ); |
9631f7d691dc
8034812: remove IDX_INIT macro hack in Node class
thartmann
parents:
23528
diff
changeset
|
50 |
case T_FLOAT: return new ConFNode( t->is_float_constant() ); |
9631f7d691dc
8034812: remove IDX_INIT macro hack in Node class
thartmann
parents:
23528
diff
changeset
|
51 |
case T_DOUBLE: return new ConDNode( t->is_double_constant() ); |
9631f7d691dc
8034812: remove IDX_INIT macro hack in Node class
thartmann
parents:
23528
diff
changeset
|
52 |
case T_VOID: return new ConNode ( Type::TOP ); |
9631f7d691dc
8034812: remove IDX_INIT macro hack in Node class
thartmann
parents:
23528
diff
changeset
|
53 |
case T_OBJECT: return new ConPNode( t->is_ptr() ); |
9631f7d691dc
8034812: remove IDX_INIT macro hack in Node class
thartmann
parents:
23528
diff
changeset
|
54 |
case T_ARRAY: return new ConPNode( t->is_aryptr() ); |
9631f7d691dc
8034812: remove IDX_INIT macro hack in Node class
thartmann
parents:
23528
diff
changeset
|
55 |
case T_ADDRESS: return new ConPNode( t->is_ptr() ); |
9631f7d691dc
8034812: remove IDX_INIT macro hack in Node class
thartmann
parents:
23528
diff
changeset
|
56 |
case T_NARROWOOP: return new ConNNode( t->is_narrowoop() ); |
9631f7d691dc
8034812: remove IDX_INIT macro hack in Node class
thartmann
parents:
23528
diff
changeset
|
57 |
case T_NARROWKLASS: return new ConNKlassNode( t->is_narrowklass() ); |
9631f7d691dc
8034812: remove IDX_INIT macro hack in Node class
thartmann
parents:
23528
diff
changeset
|
58 |
case T_METADATA: return new ConPNode( t->is_ptr() ); |
1 | 59 |
// Expected cases: TypePtr::NULL_PTR, any is_rawptr() |
60 |
// Also seen: AnyPtr(TopPTR *+top); from command line: |
|
61 |
// r -XX:+PrintOpto -XX:CIStart=285 -XX:+CompileTheWorld -XX:CompileTheWorldStartAt=660 |
|
62 |
// %%%% Stop using TypePtr::NULL_PTR to represent nulls: use either TypeRawPtr::NULL_PTR |
|
63 |
// or else TypeOopPtr::NULL_PTR. Then set Type::_basic_type[AnyPtr] = T_ILLEGAL |
|
64 |
} |
|
65 |
ShouldNotReachHere(); |
|
66 |
return NULL; |
|
67 |
} |
|
68 |
||
69 |