src/hotspot/share/c1/c1_GraphBuilder.cpp
changeset 53208 40187283e6eb
parent 52220 9c260a6b6471
child 53595 8462b295c08b
equal deleted inserted replaced
53207:b1c6d4d7f801 53208:40187283e6eb
     1 /*
     1 /*
     2  * Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1999, 2019, 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.
  1449       needs_check = false;
  1449       needs_check = false;
  1450     }
  1450     }
  1451   }
  1451   }
  1452 
  1452 
  1453   if (needs_check) {
  1453   if (needs_check) {
  1454     // Not a trivial method because C2 can do better with inlined check.
       
  1455     compilation()->set_would_profile(true);
       
  1456 
       
  1457     // Perform the registration of finalizable objects.
  1454     // Perform the registration of finalizable objects.
  1458     ValueStack* state_before = copy_state_for_exception();
  1455     ValueStack* state_before = copy_state_for_exception();
  1459     load_local(objectType, 0);
  1456     load_local(objectType, 0);
  1460     append_split(new Intrinsic(voidType, vmIntrinsics::_Object_init,
  1457     append_split(new Intrinsic(voidType, vmIntrinsics::_Object_init,
  1461                                state()->pop_arguments(1),
  1458                                state()->pop_arguments(1),
  3567     profile_return_type(result, callee);
  3564     profile_return_type(result, callee);
  3568   }
  3565   }
  3569 }
  3566 }
  3570 
  3567 
  3571 bool GraphBuilder::try_inline_intrinsics(ciMethod* callee, bool ignore_return) {
  3568 bool GraphBuilder::try_inline_intrinsics(ciMethod* callee, bool ignore_return) {
  3572   // Not a trivial method because C2 may do intrinsics better.
       
  3573   compilation()->set_would_profile(true);
       
  3574 
       
  3575   // For calling is_intrinsic_available we need to transition to
  3569   // For calling is_intrinsic_available we need to transition to
  3576   // the '_thread_in_vm' state because is_intrinsic_available()
  3570   // the '_thread_in_vm' state because is_intrinsic_available()
  3577   // accesses critical VM-internal data.
  3571   // accesses critical VM-internal data.
  3578   bool is_available = false;
  3572   bool is_available = false;
  3579   {
  3573   {