aboutsummaryrefslogtreecommitdiff
path: root/src/share/vm/opto
diff options
context:
space:
mode:
authorkvn <none@none>2011-07-27 17:28:36 -0700
committerkvn <none@none>2011-07-27 17:28:36 -0700
commit63844830b0d7dabf7d8dcbefce27cf1d7fffaa72 (patch)
tree1324bbf278ed8e04b1724b7c4bfd0a0a83e6c228 /src/share/vm/opto
parent92329a90fb4c4dd91090db6fd2b7629742cbf9fb (diff)
7069452: Cleanup NodeFlags
Summary: Remove flags which duplicate information in Node::NodeClasses. Reviewed-by: never
Diffstat (limited to 'src/share/vm/opto')
-rw-r--r--src/share/vm/opto/block.cpp10
-rw-r--r--src/share/vm/opto/callnode.hpp2
-rw-r--r--src/share/vm/opto/cfgnode.hpp4
-rw-r--r--src/share/vm/opto/coalesce.cpp6
-rw-r--r--src/share/vm/opto/gcm.cpp2
-rw-r--r--src/share/vm/opto/idealGraphPrinter.cpp15
-rw-r--r--src/share/vm/opto/lcm.cpp12
-rw-r--r--src/share/vm/opto/machnode.hpp21
-rw-r--r--src/share/vm/opto/mulnode.cpp2
-rw-r--r--src/share/vm/opto/mulnode.hpp4
-rw-r--r--src/share/vm/opto/node.hpp92
-rw-r--r--src/share/vm/opto/output.cpp20
-rw-r--r--src/share/vm/opto/reg_split.cpp2
-rw-r--r--src/share/vm/opto/superword.cpp9
-rw-r--r--src/share/vm/opto/superword.hpp2
-rw-r--r--src/share/vm/opto/vectornode.cpp2
-rw-r--r--src/share/vm/opto/vectornode.hpp10
17 files changed, 94 insertions, 121 deletions
diff --git a/src/share/vm/opto/block.cpp b/src/share/vm/opto/block.cpp
index 5514b97f8..1f32ef305 100644
--- a/src/share/vm/opto/block.cpp
+++ b/src/share/vm/opto/block.cpp
@@ -165,7 +165,7 @@ int Block::is_Empty() const {
int end_idx = _nodes.size()-1;
// Check for ending goto
- if ((end_idx > 0) && (_nodes[end_idx]->is_Goto())) {
+ if ((end_idx > 0) && (_nodes[end_idx]->is_MachGoto())) {
success_result = empty_with_goto;
end_idx--;
}
@@ -197,11 +197,11 @@ int Block::is_Empty() const {
bool Block::has_uncommon_code() const {
Node* en = end();
- if (en->is_Goto())
+ if (en->is_MachGoto())
en = en->in(0);
if (en->is_Catch())
en = en->in(0);
- if (en->is_Proj() && en->in(0)->is_MachCall()) {
+ if (en->is_MachProj() && en->in(0)->is_MachCall()) {
MachCallNode* call = en->in(0)->as_MachCall();
if (call->cnt() != COUNT_UNKNOWN && call->cnt() <= PROB_UNLIKELY_MAG(4)) {
// This is true for slow-path stubs like new_{instance,array},
@@ -945,8 +945,8 @@ void PhaseCFG::verify( ) const {
assert( bp, "last instruction must be a block proj" );
assert( bp == b->_nodes[j], "wrong number of successors for this block" );
if( bp->is_Catch() ) {
- while( b->_nodes[--j]->Opcode() == Op_MachProj ) ;
- assert( b->_nodes[j]->is_Call(), "CatchProj must follow call" );
+ while( b->_nodes[--j]->is_MachProj() ) ;
+ assert( b->_nodes[j]->is_MachCall(), "CatchProj must follow call" );
}
else if( bp->is_Mach() && bp->as_Mach()->ideal_Opcode() == Op_If ) {
assert( b->_num_succs == 2, "Conditional branch must have two targets");
diff --git a/src/share/vm/opto/callnode.hpp b/src/share/vm/opto/callnode.hpp
index 774b4b8dd..ee72a6e3a 100644
--- a/src/share/vm/opto/callnode.hpp
+++ b/src/share/vm/opto/callnode.hpp
@@ -67,7 +67,6 @@ public:
const TypeTuple *_domain;
StartNode( Node *root, const TypeTuple *domain ) : MultiNode(2), _domain(domain) {
init_class_id(Class_Start);
- init_flags(Flag_is_block_start);
init_req(0,this);
init_req(1,root);
}
@@ -513,7 +512,6 @@ public:
_cnt(COUNT_UNKNOWN)
{
init_class_id(Class_Call);
- init_flags(Flag_is_Call);
}
const TypeFunc* tf() const { return _tf; }
diff --git a/src/share/vm/opto/cfgnode.hpp b/src/share/vm/opto/cfgnode.hpp
index 71bc2ab75..a51d78bb3 100644
--- a/src/share/vm/opto/cfgnode.hpp
+++ b/src/share/vm/opto/cfgnode.hpp
@@ -217,9 +217,7 @@ public:
// GotoNodes perform direct branches.
class GotoNode : public Node {
public:
- GotoNode( Node *control ) : Node(control) {
- init_flags(Flag_is_Goto);
- }
+ GotoNode( Node *control ) : Node(control) {}
virtual int Opcode() const;
virtual bool pinned() const { return true; }
virtual bool is_CFG() const { return true; }
diff --git a/src/share/vm/opto/coalesce.cpp b/src/share/vm/opto/coalesce.cpp
index bc4d1fdcf..0811ea061 100644
--- a/src/share/vm/opto/coalesce.cpp
+++ b/src/share/vm/opto/coalesce.cpp
@@ -139,7 +139,7 @@ int PhaseChaitin::clone_projs( Block *b, uint idx, Node *con, Node *copy, uint &
Block *bcon = _cfg._bbs[con->_idx];
uint cindex = bcon->find_node(con);
Node *con_next = bcon->_nodes[cindex+1];
- if( con_next->in(0) != con || con_next->Opcode() != Op_MachProj )
+ if( con_next->in(0) != con || !con_next->is_MachProj() )
return false; // No MachProj's follow
// Copy kills after the cloned constant
@@ -312,7 +312,7 @@ void PhaseAggressiveCoalesce::insert_copy_with_overlap( Block *b, Node *copy, ui
// parallel renaming effort.
if( n->_idx < _unique ) break;
uint idx = n->is_Copy();
- assert( idx || n->is_Con() || n->Opcode() == Op_MachProj, "Only copies during parallel renaming" );
+ assert( idx || n->is_Con() || n->is_MachProj(), "Only copies during parallel renaming" );
if( idx && _phc.Find(n->in(idx)) == dst_name ) break;
i--;
}
@@ -329,7 +329,7 @@ void PhaseAggressiveCoalesce::insert_copy_with_overlap( Block *b, Node *copy, ui
// Check for end of virtual copies; this is also the end of the
// parallel renaming effort.
if( n->_idx < _unique ) break;
- assert( n->is_Copy() || n->is_Con() || n->Opcode() == Op_MachProj, "Only copies during parallel renaming" );
+ assert( n->is_Copy() || n->is_Con() || n->is_MachProj(), "Only copies during parallel renaming" );
if( _phc.Find(n) == src_name ) {
kill_src_idx = i;
break;
diff --git a/src/share/vm/opto/gcm.cpp b/src/share/vm/opto/gcm.cpp
index f714d01f0..b504ea59f 100644
--- a/src/share/vm/opto/gcm.cpp
+++ b/src/share/vm/opto/gcm.cpp
@@ -1137,7 +1137,7 @@ void PhaseCFG::schedule_late(VectorSet &visited, Node_List &stack) {
// No uses, just terminate
if (self->outcnt() == 0) {
- assert(self->Opcode() == Op_MachProj, "sanity");
+ assert(self->is_MachProj(), "sanity");
continue; // Must be a dead machine projection
}
diff --git a/src/share/vm/opto/idealGraphPrinter.cpp b/src/share/vm/opto/idealGraphPrinter.cpp
index 829673aa7..7803ac647 100644
--- a/src/share/vm/opto/idealGraphPrinter.cpp
+++ b/src/share/vm/opto/idealGraphPrinter.cpp
@@ -426,9 +426,6 @@ void IdealGraphPrinter::visit_node(Node *n, void *param) {
if (flags & Node::Flag_is_Copy) {
print_prop("is_copy", "true");
}
- if (flags & Node::Flag_is_Call) {
- print_prop("is_call", "true");
- }
if (flags & Node::Flag_rematerialize) {
print_prop("rematerialize", "true");
}
@@ -447,24 +444,12 @@ void IdealGraphPrinter::visit_node(Node *n, void *param) {
if (flags & Node::Flag_is_Branch) {
print_prop("is_branch", "true");
}
- if (flags & Node::Flag_is_block_start) {
- print_prop("is_block_start", "true");
- }
- if (flags & Node::Flag_is_Goto) {
- print_prop("is_goto", "true");
- }
if (flags & Node::Flag_is_dead_loop_safe) {
print_prop("is_dead_loop_safe", "true");
}
if (flags & Node::Flag_may_be_short_branch) {
print_prop("may_be_short_branch", "true");
}
- if (flags & Node::Flag_is_safepoint_node) {
- print_prop("is_safepoint_node", "true");
- }
- if (flags & Node::Flag_is_pc_relative) {
- print_prop("is_pc_relative", "true");
- }
if (C->matcher() != NULL) {
if (C->matcher()->is_shared(node)) {
diff --git a/src/share/vm/opto/lcm.cpp b/src/share/vm/opto/lcm.cpp
index af75a8d42..425e10bad 100644
--- a/src/share/vm/opto/lcm.cpp
+++ b/src/share/vm/opto/lcm.cpp
@@ -325,7 +325,7 @@ void Block::implicit_null_check(PhaseCFG *cfg, Node *proj, Node *val, int allowe
// that also need to be hoisted.
for (DUIterator_Fast jmax, j = val->fast_outs(jmax); j < jmax; j++) {
Node* n = val->fast_out(j);
- if( n->Opcode() == Op_MachProj ) {
+ if( n->is_MachProj() ) {
cfg->_bbs[n->_idx]->find_remove(n);
this->add_inst(n);
cfg->_bbs.map(n->_idx,this);
@@ -347,7 +347,7 @@ void Block::implicit_null_check(PhaseCFG *cfg, Node *proj, Node *val, int allowe
// Should be DU safe because no edge updates.
for (DUIterator_Fast jmax, j = best->fast_outs(jmax); j < jmax; j++) {
Node* n = best->fast_out(j);
- if( n->Opcode() == Op_MachProj ) {
+ if( n->is_MachProj() ) {
cfg->_bbs[n->_idx]->find_remove(n);
add_inst(n);
cfg->_bbs.map(n->_idx,this);
@@ -539,7 +539,7 @@ void Block::needed_for_next_call(Node *this_call, VectorSet &next_call, Block_Ar
Node* m = this_call->fast_out(i);
if( bbs[m->_idx] == this && // Local-block user
m != this_call && // Not self-start node
- m->is_Call() )
+ m->is_MachCall() )
call = m;
break;
}
@@ -557,7 +557,7 @@ uint Block::sched_call( Matcher &matcher, Block_Array &bbs, uint node_cnt, Node_
// Collect all the defined registers.
for (DUIterator_Fast imax, i = mcall->fast_outs(imax); i < imax; i++) {
Node* n = mcall->fast_out(i);
- assert( n->Opcode()==Op_MachProj, "" );
+ assert( n->is_MachProj(), "" );
--ready_cnt[n->_idx];
assert( !ready_cnt[n->_idx], "" );
// Schedule next to call
@@ -975,8 +975,8 @@ void Block::call_catch_cleanup(Block_Array &bbs) {
if( !_nodes[end]->is_Catch() ) return;
// Start of region to clone
uint beg = end;
- while( _nodes[beg-1]->Opcode() != Op_MachProj ||
- !_nodes[beg-1]->in(0)->is_Call() ) {
+ while(!_nodes[beg-1]->is_MachProj() ||
+ !_nodes[beg-1]->in(0)->is_MachCall() ) {
beg--;
assert(beg > 0,"Catch cleanup walking beyond block boundary");
}
diff --git a/src/share/vm/opto/machnode.hpp b/src/share/vm/opto/machnode.hpp
index b1544c367..cad89a0c6 100644
--- a/src/share/vm/opto/machnode.hpp
+++ b/src/share/vm/opto/machnode.hpp
@@ -275,9 +275,6 @@ public:
// Apply peephole rule(s) to this instruction
virtual MachNode *peephole( Block *block, int block_index, PhaseRegAlloc *ra_, int &deleted, Compile* C );
- // Check for PC-Relative addressing
- bool is_pc_relative() const { return (flags() & Flag_is_pc_relative) != 0; }
-
// Top-level ideal Opcode matched
virtual int ideal_Opcode() const { return Op_Node; }
@@ -525,7 +522,7 @@ public:
const uint _vidx; // Index of memop being tested
MachNullCheckNode( Node *ctrl, Node *memop, uint vidx ) : MachIdealNode(), _vidx(vidx) {
init_class_id(Class_MachNullCheck);
- init_flags(Flag_is_Branch | Flag_is_pc_relative);
+ init_flags(Flag_is_Branch);
add_req(ctrl);
add_req(memop);
}
@@ -554,7 +551,9 @@ public:
// occasional callbacks to the machine model for important info.
class MachProjNode : public ProjNode {
public:
- MachProjNode( Node *multi, uint con, const RegMask &out, uint ideal_reg ) : ProjNode(multi,con), _rout(out), _ideal_reg(ideal_reg) {}
+ MachProjNode( Node *multi, uint con, const RegMask &out, uint ideal_reg ) : ProjNode(multi,con), _rout(out), _ideal_reg(ideal_reg) {
+ init_class_id(Class_MachProj);
+ }
RegMask _rout;
const uint _ideal_reg;
enum projType {
@@ -589,6 +588,15 @@ public:
#endif
};
+//------------------------------MachGotoNode-----------------------------------
+// Machine-specific versions of GotoNodes
+class MachGotoNode : public MachNode {
+public:
+ MachGotoNode() : MachNode() {
+ init_class_id(Class_MachGoto);
+ }
+};
+
//------------------------------MachFastLockNode-------------------------------------
// Machine-specific versions of FastLockNodes
class MachFastLockNode : public MachNode {
@@ -631,14 +639,12 @@ public:
MachSafePointNode() : MachReturnNode(), _oop_map(NULL), _jvms(NULL), _jvmadj(0) {
init_class_id(Class_MachSafePoint);
- init_flags(Flag_is_safepoint_node);
}
virtual JVMState* jvms() const { return _jvms; }
void set_jvms(JVMState* s) {
_jvms = s;
}
- bool is_safepoint_node() const { return (flags() & Flag_is_safepoint_node) != 0; }
virtual const Type *bottom_type() const;
virtual const RegMask &in_RegMask(uint) const;
@@ -702,7 +708,6 @@ public:
MachCallNode() : MachSafePointNode() {
init_class_id(Class_MachCall);
- init_flags(Flag_is_Call);
}
virtual const Type *bottom_type() const;
diff --git a/src/share/vm/opto/mulnode.cpp b/src/share/vm/opto/mulnode.cpp
index cf838c769..f08631928 100644
--- a/src/share/vm/opto/mulnode.cpp
+++ b/src/share/vm/opto/mulnode.cpp
@@ -98,7 +98,7 @@ Node *MulNode::Ideal(PhaseGVN *phase, bool can_reshape) {
const Type *t12 = phase->type( mul1->in(2) );
if( t12->singleton() && t12 != Type::TOP) { // Left input is an add of a constant?
// Compute new constant; check for overflow
- const Type *tcon01 = mul1->as_Mul()->mul_ring(t2,t12);
+ const Type *tcon01 = ((MulNode*)mul1)->mul_ring(t2,t12);
if( tcon01->singleton() ) {
// The Mul of the flattened expression
set_req(1, mul1->in(1));
diff --git a/src/share/vm/opto/mulnode.hpp b/src/share/vm/opto/mulnode.hpp
index a674940b5..11cc77145 100644
--- a/src/share/vm/opto/mulnode.hpp
+++ b/src/share/vm/opto/mulnode.hpp
@@ -41,9 +41,7 @@ class PhaseTransform;
class MulNode : public Node {
virtual uint hash() const;
public:
- MulNode( Node *in1, Node *in2 ): Node(0,in1,in2) {
- init_class_id(Class_Mul);
- }
+ MulNode( Node *in1, Node *in2 ): Node(0,in1,in2) {}
// Handle algebraic identities here. If we have an identity, return the Node
// we are equivalent to. We look for "add of zero" as an identity.
diff --git a/src/share/vm/opto/node.hpp b/src/share/vm/opto/node.hpp
index 37a658da7..4b53d9d80 100644
--- a/src/share/vm/opto/node.hpp
+++ b/src/share/vm/opto/node.hpp
@@ -67,6 +67,8 @@ class EncodePNode;
class FastLockNode;
class FastUnlockNode;
class IfNode;
+class IfFalseNode;
+class IfTrueNode;
class InitializeNode;
class JVMState;
class JumpNode;
@@ -83,9 +85,11 @@ class MachCallRuntimeNode;
class MachCallStaticJavaNode;
class MachConstantBaseNode;
class MachConstantNode;
+class MachGotoNode;
class MachIfNode;
class MachNode;
class MachNullCheckNode;
+class MachProjNode;
class MachReturnNode;
class MachSafePointNode;
class MachSpillCopyNode;
@@ -94,7 +98,6 @@ class Matcher;
class MemBarNode;
class MemNode;
class MergeMemNode;
-class MulNode;
class MultiNode;
class MultiBranchNode;
class NeverBranchNode;
@@ -127,9 +130,10 @@ class SubNode;
class Type;
class TypeNode;
class UnlockNode;
+class VectorNode;
+class VectorLoadNode;
+class VectorStoreNode;
class VectorSet;
-class IfTrueNode;
-class IfFalseNode;
typedef void (*NFunc)(Node&,void*);
extern "C" {
typedef int (*C_sort_func_t)(const void *, const void *);
@@ -574,44 +578,48 @@ public:
DEFINE_CLASS_ID(MachTemp, Mach, 4)
DEFINE_CLASS_ID(MachConstantBase, Mach, 5)
DEFINE_CLASS_ID(MachConstant, Mach, 6)
+ DEFINE_CLASS_ID(MachGoto, Mach, 7)
+
+ DEFINE_CLASS_ID(Type, Node, 2)
+ DEFINE_CLASS_ID(Phi, Type, 0)
+ DEFINE_CLASS_ID(ConstraintCast, Type, 1)
+ DEFINE_CLASS_ID(CheckCastPP, Type, 2)
+ DEFINE_CLASS_ID(CMove, Type, 3)
+ DEFINE_CLASS_ID(SafePointScalarObject, Type, 4)
+ DEFINE_CLASS_ID(DecodeN, Type, 5)
+ DEFINE_CLASS_ID(EncodeP, Type, 6)
- DEFINE_CLASS_ID(Proj, Node, 2)
+ DEFINE_CLASS_ID(Proj, Node, 3)
DEFINE_CLASS_ID(CatchProj, Proj, 0)
DEFINE_CLASS_ID(JumpProj, Proj, 1)
DEFINE_CLASS_ID(IfTrue, Proj, 2)
DEFINE_CLASS_ID(IfFalse, Proj, 3)
DEFINE_CLASS_ID(Parm, Proj, 4)
+ DEFINE_CLASS_ID(MachProj, Proj, 5)
- DEFINE_CLASS_ID(Region, Node, 3)
+ DEFINE_CLASS_ID(Mem, Node, 4)
+ DEFINE_CLASS_ID(Load, Mem, 0)
+ DEFINE_CLASS_ID(VectorLoad, Load, 0)
+ DEFINE_CLASS_ID(Store, Mem, 1)
+ DEFINE_CLASS_ID(VectorStore, Store, 0)
+ DEFINE_CLASS_ID(LoadStore, Mem, 2)
+
+ DEFINE_CLASS_ID(Region, Node, 5)
DEFINE_CLASS_ID(Loop, Region, 0)
DEFINE_CLASS_ID(Root, Loop, 0)
DEFINE_CLASS_ID(CountedLoop, Loop, 1)
- DEFINE_CLASS_ID(Sub, Node, 4)
+ DEFINE_CLASS_ID(Sub, Node, 6)
DEFINE_CLASS_ID(Cmp, Sub, 0)
DEFINE_CLASS_ID(FastLock, Cmp, 0)
DEFINE_CLASS_ID(FastUnlock, Cmp, 1)
- DEFINE_CLASS_ID(Type, Node, 5)
- DEFINE_CLASS_ID(Phi, Type, 0)
- DEFINE_CLASS_ID(ConstraintCast, Type, 1)
- DEFINE_CLASS_ID(CheckCastPP, Type, 2)
- DEFINE_CLASS_ID(CMove, Type, 3)
- DEFINE_CLASS_ID(SafePointScalarObject, Type, 4)
- DEFINE_CLASS_ID(DecodeN, Type, 5)
- DEFINE_CLASS_ID(EncodeP, Type, 6)
-
- DEFINE_CLASS_ID(Mem, Node, 6)
- DEFINE_CLASS_ID(Load, Mem, 0)
- DEFINE_CLASS_ID(Store, Mem, 1)
- DEFINE_CLASS_ID(LoadStore, Mem, 2)
-
DEFINE_CLASS_ID(MergeMem, Node, 7)
DEFINE_CLASS_ID(Bool, Node, 8)
DEFINE_CLASS_ID(AddP, Node, 9)
DEFINE_CLASS_ID(BoxLock, Node, 10)
DEFINE_CLASS_ID(Add, Node, 11)
- DEFINE_CLASS_ID(Mul, Node, 12)
+ DEFINE_CLASS_ID(Vector, Node, 12)
DEFINE_CLASS_ID(ClearArray, Node, 13)
_max_classes = ClassMask_ClearArray
@@ -621,21 +629,15 @@ public:
// Flags are sorted by usage frequency.
enum NodeFlags {
Flag_is_Copy = 0x01, // should be first bit to avoid shift
- Flag_is_Call = Flag_is_Copy << 1,
- Flag_rematerialize = Flag_is_Call << 1,
+ Flag_rematerialize = Flag_is_Copy << 1,
Flag_needs_anti_dependence_check = Flag_rematerialize << 1,
Flag_is_macro = Flag_needs_anti_dependence_check << 1,
Flag_is_Con = Flag_is_macro << 1,
Flag_is_cisc_alternate = Flag_is_Con << 1,
Flag_is_Branch = Flag_is_cisc_alternate << 1,
- Flag_is_block_start = Flag_is_Branch << 1,
- Flag_is_Goto = Flag_is_block_start << 1,
- Flag_is_dead_loop_safe = Flag_is_Goto << 1,
+ Flag_is_dead_loop_safe = Flag_is_Branch << 1,
Flag_may_be_short_branch = Flag_is_dead_loop_safe << 1,
- Flag_is_safepoint_node = Flag_may_be_short_branch << 1,
- Flag_is_pc_relative = Flag_is_safepoint_node << 1,
- Flag_is_Vector = Flag_is_pc_relative << 1,
- _max_flags = (Flag_is_Vector << 1) - 1 // allow flags combination
+ _max_flags = (Flag_may_be_short_branch << 1) - 1 // allow flags combination
};
private:
@@ -669,21 +671,6 @@ public:
virtual uint size_of() const;
// Other interesting Node properties
-
- // Special case: is_Call() returns true for both CallNode and MachCallNode.
- bool is_Call() const {
- return (_flags & Flag_is_Call) != 0;
- }
-
- CallNode* isa_Call() const {
- return is_Call() ? as_Call() : NULL;
- }
-
- CallNode *as_Call() const { // Only for CallNode (not for MachCallNode)
- assert((_class_id & ClassMask_Call) == Class_Call, "invalid node class");
- return (CallNode*)this;
- }
-
#define DEFINE_CLASS_QUERY(type) \
bool is_##type() const { \
return ((_class_id & ClassMask_##type) == Class_##type); \
@@ -703,6 +690,7 @@ public:
DEFINE_CLASS_QUERY(AllocateArray)
DEFINE_CLASS_QUERY(Bool)
DEFINE_CLASS_QUERY(BoxLock)
+ DEFINE_CLASS_QUERY(Call)
DEFINE_CLASS_QUERY(CallDynamicJava)
DEFINE_CLASS_QUERY(CallJava)
DEFINE_CLASS_QUERY(CallLeaf)
@@ -740,8 +728,10 @@ public:
DEFINE_CLASS_QUERY(MachCallStaticJava)
DEFINE_CLASS_QUERY(MachConstantBase)
DEFINE_CLASS_QUERY(MachConstant)
+ DEFINE_CLASS_QUERY(MachGoto)
DEFINE_CLASS_QUERY(MachIf)
DEFINE_CLASS_QUERY(MachNullCheck)
+ DEFINE_CLASS_QUERY(MachProj)
DEFINE_CLASS_QUERY(MachReturn)
DEFINE_CLASS_QUERY(MachSafePoint)
DEFINE_CLASS_QUERY(MachSpillCopy)
@@ -749,7 +739,6 @@ public:
DEFINE_CLASS_QUERY(Mem)
DEFINE_CLASS_QUERY(MemBar)
DEFINE_CLASS_QUERY(MergeMem)
- DEFINE_CLASS_QUERY(Mul)
DEFINE_CLASS_QUERY(Multi)
DEFINE_CLASS_QUERY(MultiBranch)
DEFINE_CLASS_QUERY(Parm)
@@ -764,6 +753,9 @@ public:
DEFINE_CLASS_QUERY(Store)
DEFINE_CLASS_QUERY(Sub)
DEFINE_CLASS_QUERY(Type)
+ DEFINE_CLASS_QUERY(Vector)
+ DEFINE_CLASS_QUERY(VectorLoad)
+ DEFINE_CLASS_QUERY(VectorStore)
DEFINE_CLASS_QUERY(Unlock)
#undef DEFINE_CLASS_QUERY
@@ -774,7 +766,6 @@ public:
}
bool is_Con () const { return (_flags & Flag_is_Con) != 0; }
- bool is_Goto() const { return (_flags & Flag_is_Goto) != 0; }
// The data node which is safe to leave in dead loop during IGVN optimization.
bool is_dead_loop_safe() const {
return is_Phi() || (is_Proj() && in(0) == NULL) ||
@@ -795,7 +786,7 @@ public:
// skip some other important test.)
virtual bool depends_only_on_test() const { assert(!is_CFG(), ""); return true; };
- // defined for MachNodes that match 'If' | 'Goto' | 'CountedLoopEnd'
+ // defined for MachNodes that match 'If' | 'Goto' | 'CountedLoopEnd' | 'Jump'
bool is_Branch() const { return (_flags & Flag_is_Branch) != 0; }
// When building basic blocks, I need to have a notion of block beginning
@@ -806,7 +797,7 @@ public:
if ( is_Region() )
return this == (const Node*)in(0);
else
- return (_flags & Flag_is_block_start) != 0;
+ return is_Start();
}
// The Ideal control projection Nodes are IfTrue/IfFalse, JumpProjNode, Root,
@@ -816,9 +807,6 @@ public:
// The node is a "macro" node which needs to be expanded before matching
bool is_macro() const { return (_flags & Flag_is_macro) != 0; }
- // Value is a vector of primitive values
- bool is_Vector() const { return (_flags & Flag_is_Vector) != 0; }
-
//----------------- Optimization
// Get the worst-case Type output for this Node.
diff --git a/src/share/vm/opto/output.cpp b/src/share/vm/opto/output.cpp
index 0cd49aa0c..1ea003eb4 100644
--- a/src/share/vm/opto/output.cpp
+++ b/src/share/vm/opto/output.cpp
@@ -395,7 +395,7 @@ void Compile::Shorten_branches(Label *labels, int& code_size, int& reloc_size, i
}
min_offset_from_last_call += inst_size;
// Remember end of call offset
- if (nj->is_MachCall() && nj->as_MachCall()->is_safepoint_node()) {
+ if (nj->is_MachCall() && !nj->is_MachCallLeaf()) {
min_offset_from_last_call = 0;
}
}
@@ -447,7 +447,7 @@ void Compile::Shorten_branches(Label *labels, int& code_size, int& reloc_size, i
// This requires the TRUE branch target be in succs[0]
uint bnum = b->non_connector_successor(0)->_pre_order;
uintptr_t target = blk_starts[bnum];
- if( mach->is_pc_relative() ) {
+ if( mach->is_Branch() ) {
int offset = target-(blk_starts[i] + jmp_end[i]);
if (_matcher->is_short_branch_offset(mach->rule(), offset)) {
// We've got a winner. Replace this branch.
@@ -508,7 +508,7 @@ void Compile::Shorten_branches(Label *labels, int& code_size, int& reloc_size, i
adr += nj->size(_regalloc);
// Remember end of call offset
- if (nj->is_MachCall() && nj->as_MachCall()->is_safepoint_node()) {
+ if (nj->is_MachCall() && !nj->is_MachCallLeaf()) {
last_call_adr = adr;
}
}
@@ -1295,7 +1295,7 @@ void Compile::Fill_buffer() {
// Save the return address
call_returns[b->_pre_order] = current_offset + mcall->ret_addr_offset();
- if (!mcall->is_safepoint_node()) {
+ if (mcall->is_MachCallLeaf()) {
is_mcall = false;
is_sfn = false;
}
@@ -1565,8 +1565,8 @@ void Compile::FillExceptionTables(uint cnt, uint *call_returns, uint *inct_start
uint call_return = call_returns[b->_pre_order];
#ifdef ASSERT
assert( call_return > 0, "no call seen for this basic block" );
- while( b->_nodes[--j]->Opcode() == Op_MachProj ) ;
- assert( b->_nodes[j]->is_Call(), "CatchProj must follow call" );
+ while( b->_nodes[--j]->is_MachProj() ) ;
+ assert( b->_nodes[j]->is_MachCall(), "CatchProj must follow call" );
#endif
// last instruction is a CatchNode, find it's CatchProjNodes
int nof_succs = b->_num_succs;
@@ -2350,8 +2350,8 @@ void Scheduling::DoScheduling() {
// Exclude unreachable path case when Halt node is in a separate block.
(_bb_end > 1 && last->is_Mach() && last->as_Mach()->ideal_Opcode() == Op_Halt) ) {
// There must be a prior call. Skip it.
- while( !bb->_nodes[--_bb_end]->is_Call() ) {
- assert( bb->_nodes[_bb_end]->is_Proj(), "skipping projections after expected call" );
+ while( !bb->_nodes[--_bb_end]->is_MachCall() ) {
+ assert( bb->_nodes[_bb_end]->is_MachProj(), "skipping projections after expected call" );
}
} else if( last->is_MachNullCheck() ) {
// Backup so the last null-checked memory instruction is
@@ -2663,7 +2663,7 @@ void Scheduling::ComputeRegisterAntidependencies(Block *b) {
for( uint i = _bb_end-1; i >= _bb_start; i-- ) {
Node *n = b->_nodes[i];
int is_def = n->outcnt(); // def if some uses prior to adding precedence edges
- if( n->Opcode() == Op_MachProj && n->ideal_reg() == MachProjNode::fat_proj ) {
+ if( n->is_MachProj() && n->ideal_reg() == MachProjNode::fat_proj ) {
// Fat-proj kills a slew of registers
// This can add edges to 'n' and obscure whether or not it was a def,
// hence the is_def flag.
@@ -2685,7 +2685,7 @@ void Scheduling::ComputeRegisterAntidependencies(Block *b) {
for( uint j=0; j<n->req(); j++ ) {
Node *def = n->in(j);
if( def ) {
- assert( def->Opcode() != Op_MachProj || def->ideal_reg() != MachProjNode::fat_proj, "" );
+ assert( !def->is_MachProj() || def->ideal_reg() != MachProjNode::fat_proj, "" );
anti_do_use( b, n, _regalloc->get_reg_first(def) );
anti_do_use( b, n, _regalloc->get_reg_second(def) );
}
diff --git a/src/share/vm/opto/reg_split.cpp b/src/share/vm/opto/reg_split.cpp
index 537961fd5..63a11fe8f 100644
--- a/src/share/vm/opto/reg_split.cpp
+++ b/src/share/vm/opto/reg_split.cpp
@@ -984,7 +984,7 @@ uint PhaseChaitin::Split( uint maxlrg ) {
continue;
}
- if (UseFPUForSpilling && n->is_Call() && !uup && !dup ) {
+ if (UseFPUForSpilling && n->is_MachCall() && !uup && !dup ) {
// The use at the call can force the def down so insert
// a split before the use to allow the def more freedom.
maxlrg = split_USE(def,b,n,inpidx,maxlrg,dup,false, splits,slidx);
diff --git a/src/share/vm/opto/superword.cpp b/src/share/vm/opto/superword.cpp
index 6e1be24dd..cf0f32a08 100644
--- a/src/share/vm/opto/superword.cpp
+++ b/src/share/vm/opto/superword.cpp
@@ -1167,7 +1167,7 @@ void SuperWord::output() {
} else if (n->is_Store()) {
// Promote value to be stored to vector
- VectorNode* val = vector_opd(p, MemNode::ValueIn);
+ Node* val = vector_opd(p, MemNode::ValueIn);
int opc = n->Opcode();
Node* ctl = n->in(MemNode::Control);
@@ -1199,7 +1199,7 @@ void SuperWord::output() {
//------------------------------vector_opd---------------------------
// Create a vector operand for the nodes in pack p for operand: in(opd_idx)
-VectorNode* SuperWord::vector_opd(Node_List* p, int opd_idx) {
+Node* SuperWord::vector_opd(Node_List* p, int opd_idx) {
Node* p0 = p->at(0);
uint vlen = p->size();
Node* opd = p0->in(opd_idx);
@@ -1215,9 +1215,10 @@ VectorNode* SuperWord::vector_opd(Node_List* p, int opd_idx) {
}
if (same_opd) {
- if (opd->is_Vector()) {
- return (VectorNode*)opd; // input is matching vector
+ if (opd->is_Vector() || opd->is_VectorLoad()) {
+ return opd; // input is matching vector
}
+ assert(!opd->is_VectorStore(), "such vector is not expected here");
// Convert scalar input to vector. Use p0's type because it's container
// maybe smaller than the operand's container.
const Type* opd_t = velt_type(!in_bb(opd) ? p0 : opd);
diff --git a/src/share/vm/opto/superword.hpp b/src/share/vm/opto/superword.hpp
index 50ab3d43e..509376712 100644
--- a/src/share/vm/opto/superword.hpp
+++ b/src/share/vm/opto/superword.hpp
@@ -360,7 +360,7 @@ class SuperWord : public ResourceObj {
// Convert packs into vector node operations
void output();
// Create a vector operand for the nodes in pack p for operand: in(opd_idx)
- VectorNode* vector_opd(Node_List* p, int opd_idx);
+ Node* vector_opd(Node_List* p, int opd_idx);
// Can code be generated for pack p?
bool implemented(Node_List* p);
// For pack p, are all operands and all uses (with in the block) vector?
diff --git a/src/share/vm/opto/vectornode.cpp b/src/share/vm/opto/vectornode.cpp
index 4d72b73a0..885a1c898 100644
--- a/src/share/vm/opto/vectornode.cpp
+++ b/src/share/vm/opto/vectornode.cpp
@@ -426,7 +426,7 @@ VectorLoadNode* VectorLoadNode::make(Compile* C, int opc, Node* ctl, Node* mem,
// Return the vector version of a scalar store node.
VectorStoreNode* VectorStoreNode::make(Compile* C, int opc, Node* ctl, Node* mem,
- Node* adr, const TypePtr* atyp, VectorNode* val,
+ Node* adr, const TypePtr* atyp, Node* val,
uint vlen) {
int vopc = opcode(opc, vlen);
diff --git a/src/share/vm/opto/vectornode.hpp b/src/share/vm/opto/vectornode.hpp
index 4d28703c8..7d1905c7f 100644
--- a/src/share/vm/opto/vectornode.hpp
+++ b/src/share/vm/opto/vectornode.hpp
@@ -47,10 +47,10 @@ class VectorNode : public Node {
friend class VectorStoreNode; // ditto.
VectorNode(Node* n1, uint vlen) : Node(NULL, n1), _length(vlen) {
- init_flags(Flag_is_Vector);
+ init_class_id(Class_Vector);
}
VectorNode(Node* n1, Node* n2, uint vlen) : Node(NULL, n1, n2), _length(vlen) {
- init_flags(Flag_is_Vector);
+ init_class_id(Class_Vector);
}
virtual int Opcode() const;
@@ -389,7 +389,7 @@ class VectorLoadNode : public LoadNode {
public:
VectorLoadNode(Node* c, Node* mem, Node* adr, const TypePtr* at, const Type *rt)
: LoadNode(c,mem,adr,at,rt) {
- init_flags(Flag_is_Vector);
+ init_class_id(Class_VectorLoad);
}
virtual int Opcode() const;
@@ -617,7 +617,7 @@ class VectorStoreNode : public StoreNode {
public:
VectorStoreNode(Node* c, Node* mem, Node* adr, const TypePtr* at, Node* val)
: StoreNode(c,mem,adr,at,val) {
- init_flags(Flag_is_Vector);
+ init_class_id(Class_VectorStore);
}
virtual int Opcode() const;
@@ -635,7 +635,7 @@ class VectorStoreNode : public StoreNode {
static int opcode(int sopc, uint vlen);
static VectorStoreNode* make(Compile* C, int opc, Node* ctl, Node* mem,
- Node* adr, const TypePtr* atyp, VectorNode* val,
+ Node* adr, const TypePtr* atyp, Node* val,
uint vlen);
};