src/share/vm/opto/library_call.cpp

changeset 1286
fc4be448891f
parent 1271
4325cdaa78ad
child 1291
75596850f863
child 1330
94b6d06fd759
     1.1 --- a/src/share/vm/opto/library_call.cpp	Wed Jul 15 13:37:35 2009 -0700
     1.2 +++ b/src/share/vm/opto/library_call.cpp	Thu Jul 16 14:10:42 2009 -0700
     1.3 @@ -1030,7 +1030,7 @@
     1.4    const TypeAry* target_array_type = TypeAry::make(TypeInt::CHAR, TypeInt::make(0, target_length, Type::WidenMin));
     1.5    const TypeAryPtr* target_type = TypeAryPtr::make(TypePtr::BotPTR, target_array_type, target_array->klass(), true, Type::OffsetBot);
     1.6  
     1.7 -  IdealKit kit(gvn(), control(), merged_memory());
     1.8 +  IdealKit kit(gvn(), control(), merged_memory(), false, true);
     1.9  #define __ kit.
    1.10    Node* zero             = __ ConI(0);
    1.11    Node* one              = __ ConI(1);
    1.12 @@ -1042,7 +1042,7 @@
    1.13    Node* targetOffset     = __ ConI(targetOffset_i);
    1.14    Node* sourceEnd        = __ SubI(__ AddI(sourceOffset, sourceCount), targetCountLess1);
    1.15  
    1.16 -  IdealVariable rtn(kit), i(kit), j(kit); __ declares_done();
    1.17 +  IdealVariable rtn(kit), i(kit), j(kit); __ declarations_done();
    1.18    Node* outer_loop = __ make_label(2 /* goto */);
    1.19    Node* return_    = __ make_label(1);
    1.20  
    1.21 @@ -1079,9 +1079,9 @@
    1.22         __ bind(outer_loop);
    1.23    }__ end_loop(); __ dead(i);
    1.24    __ bind(return_);
    1.25 -  __ drain_delay_transform();
    1.26 -
    1.27 -  set_control(__ ctrl());
    1.28 +
    1.29 +  // Final sync IdealKit and GraphKit.
    1.30 +  sync_kit(kit);
    1.31    Node* result = __ value(rtn);
    1.32  #undef __
    1.33    C->set_has_loops(true);
    1.34 @@ -2183,14 +2183,23 @@
    1.35          // of it. So we need to emit code to conditionally do the proper type of
    1.36          // store.
    1.37  
    1.38 -        IdealKit kit(gvn(), control(),  merged_memory());
    1.39 -        kit.declares_done();
    1.40 +        IdealKit ideal(gvn(), control(),  merged_memory());
    1.41 +#define __ ideal.
    1.42          // QQQ who knows what probability is here??
    1.43 -        kit.if_then(heap_base_oop, BoolTest::ne, null(), PROB_UNLIKELY(0.999)); {
    1.44 -          (void) store_oop_to_unknown(control(), heap_base_oop, adr, adr_type, val, type);
    1.45 -        } kit.else_(); {
    1.46 -          (void) store_to_memory(control(), adr, val, type, adr_type, is_volatile);
    1.47 -        } kit.end_if();
    1.48 +        __ if_then(heap_base_oop, BoolTest::ne, null(), PROB_UNLIKELY(0.999)); {
    1.49 +          // Sync IdealKit and graphKit.
    1.50 +          set_all_memory( __ merged_memory());
    1.51 +          set_control(__ ctrl());
    1.52 +          Node* st = store_oop_to_unknown(control(), heap_base_oop, adr, adr_type, val, type);
    1.53 +          // Update IdealKit memory.
    1.54 +          __ set_all_memory(merged_memory());
    1.55 +          __ set_ctrl(control());
    1.56 +        } __ else_(); {
    1.57 +          __ store(__ ctrl(), adr, val, type, alias_type->index(), is_volatile);
    1.58 +        } __ end_if();
    1.59 +        // Final sync IdealKit and GraphKit.
    1.60 +        sync_kit(ideal);
    1.61 +#undef __
    1.62        }
    1.63      }
    1.64    }

mercurial