Mercurial > hg > graal-compiler
diff src/share/vm/opto/machnode.cpp @ 18041:52b4284cb496
Merge with jdk8u20-b26
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Wed, 15 Oct 2014 16:02:50 +0200 |
parents | 4ca6dc0799b6 |
children | 7848fc12602b |
line wrap: on
line diff
--- a/src/share/vm/opto/machnode.cpp Thu Oct 16 10:21:29 2014 +0200 +++ b/src/share/vm/opto/machnode.cpp Wed Oct 15 16:02:50 2014 +0200 @@ -134,6 +134,10 @@ ShouldNotCallThis(); } +//---------------------------postalloc_expand---------------------------------- +// Expand node after register allocation. +void MachNode::postalloc_expand(GrowableArray <Node *> *nodes, PhaseRegAlloc *ra_) {} + //------------------------------size------------------------------------------- // Size of instruction in bytes uint MachNode::size(PhaseRegAlloc *ra_) const { @@ -393,6 +397,17 @@ return skipped; } +int MachNode::operand_index(const MachOper *oper) const { + uint skipped = oper_input_base(); // Sum of leaves skipped so far + uint opcnt; + for (opcnt = 1; opcnt < num_opnds(); opcnt++) { + if (_opnds[opcnt] == oper) break; + uint num_edges = _opnds[opcnt]->num_edges(); // leaves for operand + skipped += num_edges; + } + if (_opnds[opcnt] != oper) return -1; + return skipped; +} //------------------------------peephole--------------------------------------- // Apply peephole rule(s) to this instruction @@ -501,6 +516,9 @@ return _constant.offset(); } +int MachConstantNode::constant_offset_unchecked() const { + return _constant.offset(); +} //============================================================================= #ifndef PRODUCT @@ -641,10 +659,15 @@ //------------------------------Registers-------------------------------------- -const RegMask &MachCallNode::in_RegMask( uint idx ) const { +const RegMask &MachCallNode::in_RegMask(uint idx) const { // Values in the domain use the users calling convention, embodied in the // _in_rms array of RegMasks. - if (idx < tf()->domain()->cnt()) return _in_rms[idx]; + if (idx < tf()->domain()->cnt()) { + return _in_rms[idx]; + } + if (idx == mach_constant_base_node_input()) { + return MachConstantBaseNode::static_out_RegMask(); + } // Values outside the domain represent debug info return *Compile::current()->matcher()->idealreg2debugmask[in(idx)->ideal_reg()]; } @@ -671,7 +694,12 @@ const RegMask &MachCallJavaNode::in_RegMask(uint idx) const { // Values in the domain use the users calling convention, embodied in the // _in_rms array of RegMasks. - if (idx < tf()->domain()->cnt()) return _in_rms[idx]; + if (idx < tf()->domain()->cnt()) { + return _in_rms[idx]; + } + if (idx == mach_constant_base_node_input()) { + return MachConstantBaseNode::static_out_RegMask(); + } // Values outside the domain represent debug info Matcher* m = Compile::current()->matcher(); // If this call is a MethodHandle invoke we have to use a different