src/share/vm/opto/graphKit.cpp

changeset 1000
7fe62bb75bf4
parent 998
1b9fc6e3171b
child 1005
dca06e7f503d
     1.1 --- a/src/share/vm/opto/graphKit.cpp	Thu Feb 05 13:38:52 2009 -0800
     1.2 +++ b/src/share/vm/opto/graphKit.cpp	Thu Feb 05 14:43:58 2009 -0800
     1.3 @@ -2942,16 +2942,10 @@
     1.4  
     1.5    // Now generate allocation code
     1.6  
     1.7 -  // With escape analysis, the entire memory state is needed to be able to
     1.8 -  // eliminate the allocation.  If the allocations cannot be eliminated, this
     1.9 -  // will be optimized to the raw slice when the allocation is expanded.
    1.10 -  Node *mem;
    1.11 -  if (C->do_escape_analysis()) {
    1.12 -    mem = reset_memory();
    1.13 -    set_all_memory(mem);
    1.14 -  } else {
    1.15 -    mem = memory(Compile::AliasIdxRaw);
    1.16 -  }
    1.17 +  // The entire memory state is needed for slow path of the allocation
    1.18 +  // since GC and deoptimization can happened.
    1.19 +  Node *mem = reset_memory();
    1.20 +  set_all_memory(mem); // Create new memory state
    1.21  
    1.22    AllocateNode* alloc
    1.23      = new (C, AllocateNode::ParmLimit)
    1.24 @@ -3088,16 +3082,10 @@
    1.25  
    1.26    // Now generate allocation code
    1.27  
    1.28 -  // With escape analysis, the entire memory state is needed to be able to
    1.29 -  // eliminate the allocation.  If the allocations cannot be eliminated, this
    1.30 -  // will be optimized to the raw slice when the allocation is expanded.
    1.31 -  Node *mem;
    1.32 -  if (C->do_escape_analysis()) {
    1.33 -    mem = reset_memory();
    1.34 -    set_all_memory(mem);
    1.35 -  } else {
    1.36 -    mem = memory(Compile::AliasIdxRaw);
    1.37 -  }
    1.38 +  // The entire memory state is needed for slow path of the allocation
    1.39 +  // since GC and deoptimization can happened.
    1.40 +  Node *mem = reset_memory();
    1.41 +  set_all_memory(mem); // Create new memory state
    1.42  
    1.43    // Create the AllocateArrayNode and its result projections
    1.44    AllocateArrayNode* alloc

mercurial