src/hotspot/share/opto/parse2.cpp
changeset 48856 c866eaca24cb
parent 48826 c4d9d1b08e2e
child 49359 59f6547e151f
equal deleted inserted replaced
48834:19ef3f64bc10 48856:c866eaca24cb
     1 /*
     1 /*
     2  * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
  2262     Block *target_block = block()->successor_for_bci(target_bci);
  2262     Block *target_block = block()->successor_for_bci(target_bci);
  2263     if (target_block->pred_count() != 1)  break;
  2263     if (target_block->pred_count() != 1)  break;
  2264     ciMethodData* methodData = method()->method_data();
  2264     ciMethodData* methodData = method()->method_data();
  2265     if (!methodData->is_mature())  break;
  2265     if (!methodData->is_mature())  break;
  2266     ciProfileData* data = methodData->bci_to_data(bci());
  2266     ciProfileData* data = methodData->bci_to_data(bci());
  2267     assert( data->is_JumpData(), "" );
  2267     assert(data != NULL && data->is_JumpData(), "need JumpData for taken branch");
  2268     int taken = ((ciJumpData*)data)->taken();
  2268     int taken = ((ciJumpData*)data)->taken();
  2269     taken = method()->scale_count(taken);
  2269     taken = method()->scale_count(taken);
  2270     target_block->set_count(taken);
  2270     target_block->set_count(taken);
  2271     break;
  2271     break;
  2272   }
  2272   }