src/share/vm/shark/sharkState.cpp
Print this page
rev 3850 : [mq]: shark.patch
*** 129,150 ****
BasicBlock* this_block) {
// Method
Value *this_method = this->method();
Value *other_method = other->method();
if (this_method != other_method) {
! PHINode *phi = builder()->CreatePHI(SharkType::Method*_type(), "method");
phi->addIncoming(this_method, this_block);
phi->addIncoming(other_method, other_block);
set_method(phi);
}
// Temporary oop slot
Value *this_oop_tmp = this->oop_tmp();
Value *other_oop_tmp = other->oop_tmp();
if (this_oop_tmp != other_oop_tmp) {
assert(this_oop_tmp && other_oop_tmp, "can't merge NULL with non-NULL");
! PHINode *phi = builder()->CreatePHI(SharkType::oop_type(), "oop_tmp");
phi->addIncoming(this_oop_tmp, this_block);
phi->addIncoming(other_oop_tmp, other_block);
set_oop_tmp(phi);
}
--- 129,150 ----
BasicBlock* this_block) {
// Method
Value *this_method = this->method();
Value *other_method = other->method();
if (this_method != other_method) {
! PHINode *phi = builder()->CreatePHI(SharkType::Method_type(), 0, "method");
phi->addIncoming(this_method, this_block);
phi->addIncoming(other_method, other_block);
set_method(phi);
}
// Temporary oop slot
Value *this_oop_tmp = this->oop_tmp();
Value *other_oop_tmp = other->oop_tmp();
if (this_oop_tmp != other_oop_tmp) {
assert(this_oop_tmp && other_oop_tmp, "can't merge NULL with non-NULL");
! PHINode *phi = builder()->CreatePHI(SharkType::oop_type(), 0, "oop_tmp");
phi->addIncoming(this_oop_tmp, this_block);
phi->addIncoming(other_oop_tmp, other_block);
set_oop_tmp(phi);
}
*** 241,251 ****
SharkOSREntryState::SharkOSREntryState(SharkTopLevelBlock* block,
Value* method,
Value* osr_buf)
: SharkState(block) {
! assert(!block->stack_depth_at_entry(), "entry block shouldn't have stack");
set_num_monitors(block->ciblock()->monitor_count());
// Local variables
for (int i = 0; i < max_locals(); i++) {
ciType *type = block->local_type_at_entry(i);
--- 241,251 ----
SharkOSREntryState::SharkOSREntryState(SharkTopLevelBlock* block,
Value* method,
Value* osr_buf)
: SharkState(block) {
! assert(block->stack_depth_at_entry() == 0, "entry block shouldn't have stack");
set_num_monitors(block->ciblock()->monitor_count());
// Local variables
for (int i = 0; i < max_locals(); i++) {
ciType *type = block->local_type_at_entry(i);
*** 285,295 ****
BasicBlock *saved_insert_point = builder()->GetInsertBlock();
builder()->SetInsertPoint(block->entry_block());
char name[18];
// Method
! set_method(builder()->CreatePHI(SharkType::Method*_type(), "method"));
// Local variables
for (int i = 0; i < max_locals(); i++) {
ciType *type = block->local_type_at_entry(i);
if (type->basic_type() == (BasicType) ciTypeFlow::StateVector::T_NULL) {
--- 285,295 ----
BasicBlock *saved_insert_point = builder()->GetInsertBlock();
builder()->SetInsertPoint(block->entry_block());
char name[18];
// Method
! set_method(builder()->CreatePHI(SharkType::Method_type(), 0, "method"));
// Local variables
for (int i = 0; i < max_locals(); i++) {
ciType *type = block->local_type_at_entry(i);
if (type->basic_type() == (BasicType) ciTypeFlow::StateVector::T_NULL) {
*** 305,315 ****
case T_DOUBLE:
case T_OBJECT:
case T_ARRAY:
snprintf(name, sizeof(name), "local_%d_", i);
value = SharkValue::create_phi(
! type, builder()->CreatePHI(SharkType::to_stackType(type), name));
break;
case T_ADDRESS:
value = SharkValue::address_constant(type->as_return_address()->bci());
break;
--- 305,315 ----
case T_DOUBLE:
case T_OBJECT:
case T_ARRAY:
snprintf(name, sizeof(name), "local_%d_", i);
value = SharkValue::create_phi(
! type, builder()->CreatePHI(SharkType::to_stackType(type), 0, name));
break;
case T_ADDRESS:
value = SharkValue::address_constant(type->as_return_address()->bci());
break;
*** 343,353 ****
case T_DOUBLE:
case T_OBJECT:
case T_ARRAY:
snprintf(name, sizeof(name), "stack_%d_", i);
value = SharkValue::create_phi(
! type, builder()->CreatePHI(SharkType::to_stackType(type), name));
break;
case T_ADDRESS:
value = SharkValue::address_constant(type->as_return_address()->bci());
break;
--- 343,353 ----
case T_DOUBLE:
case T_OBJECT:
case T_ARRAY:
snprintf(name, sizeof(name), "stack_%d_", i);
value = SharkValue::create_phi(
! type, builder()->CreatePHI(SharkType::to_stackType(type), 0, name));
break;
case T_ADDRESS:
value = SharkValue::address_constant(type->as_return_address()->bci());
break;