< prev index next >

src/hotspot/share/opto/callnode.cpp

Print this page
rev 55090 : secret-sfac


1438   Node *topnode = C->top();
1439 
1440   init_req( TypeFunc::Control  , ctrl );
1441   init_req( TypeFunc::I_O      , abio );
1442   init_req( TypeFunc::Memory   , mem );
1443   init_req( TypeFunc::ReturnAdr, topnode );
1444   init_req( TypeFunc::FramePtr , topnode );
1445   init_req( AllocSize          , size);
1446   init_req( KlassNode          , klass_node);
1447   init_req( InitialTest        , initial_test);
1448   init_req( ALength            , topnode);
1449   init_req( ValueNode          , value_node);
1450   // DefaultValue defaults to NULL
1451   // RawDefaultValue defaults to NULL
1452   C->add_macro_node(this);
1453 }
1454 
1455 void AllocateNode::compute_MemBar_redundancy(ciMethod* initializer)
1456 {
1457   assert(initializer != NULL &&
1458          initializer->is_initializer() &&
1459          !initializer->is_static(),
1460              "unexpected initializer method");
1461   BCEscapeAnalyzer* analyzer = initializer->get_bcea();
1462   if (analyzer == NULL) {
1463     return;
1464   }
1465 
1466   // Allocation node is first parameter in its initializer
1467   if (analyzer->is_arg_stack(0) || analyzer->is_arg_local(0)) {
1468     _is_allocation_MemBar_redundant = true;
1469   }
1470 }
1471 
1472 Node* AllocateNode::Ideal(PhaseGVN* phase, bool can_reshape) {
1473   // Check for unused value type allocation
1474   if (can_reshape && in(AllocateNode::ValueNode) != NULL &&
1475       outcnt() != 0 && result_cast() == NULL) {
1476     // Remove allocation by replacing the projection nodes with its inputs
1477     InitializeNode* init = initialization();
1478     PhaseIterGVN* igvn = phase->is_IterGVN();
1479     CallProjections* projs = extract_projections(true, false);




1438   Node *topnode = C->top();
1439 
1440   init_req( TypeFunc::Control  , ctrl );
1441   init_req( TypeFunc::I_O      , abio );
1442   init_req( TypeFunc::Memory   , mem );
1443   init_req( TypeFunc::ReturnAdr, topnode );
1444   init_req( TypeFunc::FramePtr , topnode );
1445   init_req( AllocSize          , size);
1446   init_req( KlassNode          , klass_node);
1447   init_req( InitialTest        , initial_test);
1448   init_req( ALength            , topnode);
1449   init_req( ValueNode          , value_node);
1450   // DefaultValue defaults to NULL
1451   // RawDefaultValue defaults to NULL
1452   C->add_macro_node(this);
1453 }
1454 
1455 void AllocateNode::compute_MemBar_redundancy(ciMethod* initializer)
1456 {
1457   assert(initializer != NULL &&
1458          initializer->is_object_constructor_or_class_initializer(),

1459          "unexpected initializer method");
1460   BCEscapeAnalyzer* analyzer = initializer->get_bcea();
1461   if (analyzer == NULL) {
1462     return;
1463   }
1464 
1465   // Allocation node is first parameter in its initializer
1466   if (analyzer->is_arg_stack(0) || analyzer->is_arg_local(0)) {
1467     _is_allocation_MemBar_redundant = true;
1468   }
1469 }
1470 
1471 Node* AllocateNode::Ideal(PhaseGVN* phase, bool can_reshape) {
1472   // Check for unused value type allocation
1473   if (can_reshape && in(AllocateNode::ValueNode) != NULL &&
1474       outcnt() != 0 && result_cast() == NULL) {
1475     // Remove allocation by replacing the projection nodes with its inputs
1476     InitializeNode* init = initialization();
1477     PhaseIterGVN* igvn = phase->is_IterGVN();
1478     CallProjections* projs = extract_projections(true, false);


< prev index next >