src/share/vm/opto/output.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
8034812 Cdiff src/share/vm/opto/output.cpp
src/share/vm/opto/output.cpp
Print this page
*** 65,90 ****
Block *broot = _cfg->get_root_block();
const StartNode *start = entry->head()->as_Start();
// Replace StartNode with prolog
! MachPrologNode *prolog = new (this) MachPrologNode();
entry->map_node(prolog, 0);
_cfg->map_node_to_block(prolog, entry);
_cfg->unmap_node_from_block(start); // start is no longer in any block
// Virtual methods need an unverified entry point
if( is_osr_compilation() ) {
if( PoisonOSREntry ) {
// TODO: Should use a ShouldNotReachHereNode...
! _cfg->insert( broot, 0, new (this) MachBreakpointNode() );
}
} else {
if( _method && !_method->flags().is_static() ) {
// Insert unvalidated entry point
! _cfg->insert( broot, 0, new (this) MachUEPNode() );
}
}
--- 65,90 ----
Block *broot = _cfg->get_root_block();
const StartNode *start = entry->head()->as_Start();
// Replace StartNode with prolog
! MachPrologNode *prolog = new MachPrologNode();
entry->map_node(prolog, 0);
_cfg->map_node_to_block(prolog, entry);
_cfg->unmap_node_from_block(start); // start is no longer in any block
// Virtual methods need an unverified entry point
if( is_osr_compilation() ) {
if( PoisonOSREntry ) {
// TODO: Should use a ShouldNotReachHereNode...
! _cfg->insert( broot, 0, new MachBreakpointNode() );
}
} else {
if( _method && !_method->flags().is_static() ) {
// Insert unvalidated entry point
! _cfg->insert( broot, 0, new MachUEPNode() );
}
}
*** 96,115 ****
||(OptoBreakpointC2R && !_method)
#endif
) {
// checking for _method means that OptoBreakpoint does not apply to
// runtime stubs or frame converters
! _cfg->insert( entry, 1, new (this) MachBreakpointNode() );
}
// Insert epilogs before every return
for (uint i = 0; i < _cfg->number_of_blocks(); i++) {
Block* block = _cfg->get_block(i);
if (!block->is_connector() && block->non_connector_successor(0) == _cfg->get_root_block()) { // Found a program exit point?
Node* m = block->end();
if (m->is_Mach() && m->as_Mach()->ideal_Opcode() != Op_Halt) {
! MachEpilogNode* epilog = new (this) MachEpilogNode(m->as_Mach()->ideal_Opcode() == Op_Return);
block->add_inst(epilog);
_cfg->map_node_to_block(epilog, block);
}
}
}
--- 96,115 ----
||(OptoBreakpointC2R && !_method)
#endif
) {
// checking for _method means that OptoBreakpoint does not apply to
// runtime stubs or frame converters
! _cfg->insert( entry, 1, new MachBreakpointNode() );
}
// Insert epilogs before every return
for (uint i = 0; i < _cfg->number_of_blocks(); i++) {
Block* block = _cfg->get_block(i);
if (!block->is_connector() && block->non_connector_successor(0) == _cfg->get_root_block()) { // Found a program exit point?
Node* m = block->end();
if (m->is_Mach() && m->as_Mach()->ideal_Opcode() != Op_Halt) {
! MachEpilogNode* epilog = new MachEpilogNode(m->as_Mach()->ideal_Opcode() == Op_Return);
block->add_inst(epilog);
_cfg->map_node_to_block(epilog, block);
}
}
}
*** 266,276 ****
Node* Compile::call_zap_node(MachSafePointNode* node_to_check, int block_no) {
const TypeFunc *tf = OptoRuntime::zap_dead_locals_Type();
CallStaticJavaNode* ideal_node =
! new (this) CallStaticJavaNode( tf,
OptoRuntime::zap_dead_locals_stub(_method->flags().is_native()),
"call zap dead locals stub", 0, TypePtr::BOTTOM);
// We need to copy the OopMap from the site we're zapping at.
// We have to make a copy, because the zap site might not be
// a call site, and zap_dead is a call site.
--- 266,276 ----
Node* Compile::call_zap_node(MachSafePointNode* node_to_check, int block_no) {
const TypeFunc *tf = OptoRuntime::zap_dead_locals_Type();
CallStaticJavaNode* ideal_node =
! new CallStaticJavaNode( tf,
OptoRuntime::zap_dead_locals_stub(_method->flags().is_native()),
"call zap dead locals stub", 0, TypePtr::BOTTOM);
// We need to copy the OopMap from the site we're zapping at.
// We have to make a copy, because the zap site might not be
// a call site, and zap_dead is a call site.
*** 366,376 ****
// third inserts nops where needed.
// Step one, perform a pessimistic sizing pass.
uint last_call_adr = max_uint;
uint last_avoid_back_to_back_adr = max_uint;
! uint nop_size = (new (this) MachNopNode())->size(_regalloc);
for (uint i = 0; i < nblocks; i++) { // For all blocks
Block* block = _cfg->get_block(i);
// During short branch replacement, we store the relative (to blk_starts)
// offset of jump in jmp_offset, rather than the absolute offset of jump.
--- 366,376 ----
// third inserts nops where needed.
// Step one, perform a pessimistic sizing pass.
uint last_call_adr = max_uint;
uint last_avoid_back_to_back_adr = max_uint;
! uint nop_size = (new MachNopNode())->size(_regalloc);
for (uint i = 0; i < nblocks; i++) { // For all blocks
Block* block = _cfg->get_block(i);
// During short branch replacement, we store the relative (to blk_starts)
// offset of jump in jmp_offset, rather than the absolute offset of jump.
*** 1199,1209 ****
// Count and start of calls
uint *call_returns = NEW_RESOURCE_ARRAY(uint, nblocks+1);
uint return_offset = 0;
! int nop_size = (new (this) MachNopNode())->size(_regalloc);
int previous_offset = 0;
int current_offset = 0;
int last_call_offset = -1;
int last_avoid_back_to_back_offset = -1;
--- 1199,1209 ----
// Count and start of calls
uint *call_returns = NEW_RESOURCE_ARRAY(uint, nblocks+1);
uint return_offset = 0;
! int nop_size = (new MachNopNode())->size(_regalloc);
int previous_offset = 0;
int current_offset = 0;
int last_call_offset = -1;
int last_avoid_back_to_back_offset = -1;
*** 1325,1335 ****
}
if(padding > 0) {
assert((padding % nop_size) == 0, "padding is not a multiple of NOP size");
int nops_cnt = padding / nop_size;
! MachNode *nop = new (this) MachNopNode(nops_cnt);
block->insert_node(nop, j++);
last_inst++;
_cfg->map_node_to_block(nop, block);
nop->emit(*cb, _regalloc);
cb->flush_bundle(true);
--- 1325,1335 ----
}
if(padding > 0) {
assert((padding % nop_size) == 0, "padding is not a multiple of NOP size");
int nops_cnt = padding / nop_size;
! MachNode *nop = new MachNopNode(nops_cnt);
block->insert_node(nop, j++);
last_inst++;
_cfg->map_node_to_block(nop, block);
nop->emit(*cb, _regalloc);
cb->flush_bundle(true);
*** 1411,1421 ****
// Update the jmp_size.
int new_size = replacement->size(_regalloc);
assert((br_size - new_size) >= (int)nop_size, "short_branch size should be smaller");
// Insert padding between avoid_back_to_back branches.
if (needs_padding && replacement->avoid_back_to_back(MachNode::AVOID_BEFORE)) {
! MachNode *nop = new (this) MachNopNode();
block->insert_node(nop, j++);
_cfg->map_node_to_block(nop, block);
last_inst++;
nop->emit(*cb, _regalloc);
cb->flush_bundle(true);
--- 1411,1421 ----
// Update the jmp_size.
int new_size = replacement->size(_regalloc);
assert((br_size - new_size) >= (int)nop_size, "short_branch size should be smaller");
// Insert padding between avoid_back_to_back branches.
if (needs_padding && replacement->avoid_back_to_back(MachNode::AVOID_BEFORE)) {
! MachNode *nop = new MachNopNode();
block->insert_node(nop, j++);
_cfg->map_node_to_block(nop, block);
last_inst++;
nop->emit(*cb, _regalloc);
cb->flush_bundle(true);
*** 1571,1581 ****
// the loop top a little. Helps prevent pipe stalls at loop back branches.
if (i < nblocks-1) {
Block *nb = _cfg->get_block(i + 1);
int padding = nb->alignment_padding(current_offset);
if( padding > 0 ) {
! MachNode *nop = new (this) MachNopNode(padding / nop_size);
block->insert_node(nop, block->number_of_nodes());
_cfg->map_node_to_block(nop, block);
nop->emit(*cb, _regalloc);
current_offset = cb->insts_size();
}
--- 1571,1581 ----
// the loop top a little. Helps prevent pipe stalls at loop back branches.
if (i < nblocks-1) {
Block *nb = _cfg->get_block(i + 1);
int padding = nb->alignment_padding(current_offset);
if( padding > 0 ) {
! MachNode *nop = new MachNopNode(padding / nop_size);
block->insert_node(nop, block->number_of_nodes());
_cfg->map_node_to_block(nop, block);
nop->emit(*cb, _regalloc);
current_offset = cb->insts_size();
}
*** 1784,1794 ****
, _branches(0)
, _unconditional_delays(0)
#endif
{
// Create a MachNopNode
! _nop = new (&compile) MachNopNode();
// Now that the nops are in the array, save the count
// (but allow entries for the nops)
_node_bundling_limit = compile.unique();
uint node_max = _regalloc->node_regs_max_index();
--- 1784,1794 ----
, _branches(0)
, _unconditional_delays(0)
#endif
{
// Create a MachNopNode
! _nop = new MachNopNode();
// Now that the nops are in the array, save the count
// (but allow entries for the nops)
_node_bundling_limit = compile.unique();
uint node_max = _regalloc->node_regs_max_index();
*** 2686,2696 ****
if( pinch->Opcode() != Op_Node ) { // Or later-def/kill as pinch-point?
later_def = pinch; // Must be def/kill as optimistic pinch-point
if ( _pinch_free_list.size() > 0) {
pinch = _pinch_free_list.pop();
} else {
! pinch = new (_cfg->C) Node(1); // Pinch point to-be
}
if (pinch->_idx >= _regalloc->node_regs_max_index()) {
_cfg->C->record_method_not_compilable("too many D-U pinch points");
return;
}
--- 2686,2696 ----
if( pinch->Opcode() != Op_Node ) { // Or later-def/kill as pinch-point?
later_def = pinch; // Must be def/kill as optimistic pinch-point
if ( _pinch_free_list.size() > 0) {
pinch = _pinch_free_list.pop();
} else {
! pinch = new Node(1); // Pinch point to-be
}
if (pinch->_idx >= _regalloc->node_regs_max_index()) {
_cfg->C->record_method_not_compilable("too many D-U pinch points");
return;
}
src/share/vm/opto/output.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File