< prev index next >

src/hotspot/share/c1/c1_LIRGenerator.cpp

Print this page
*** 32,10 ***
--- 32,11 ---
  #include "c1/c1_ValueStack.hpp"
  #include "ci/ciArrayKlass.hpp"
  #include "ci/ciInstance.hpp"
  #include "ci/ciObjArray.hpp"
  #include "ci/ciUtilities.hpp"
+ #include "code/SCCache.hpp"
  #include "compiler/compilerDefinitions.inline.hpp"
  #include "compiler/compilerOracle.hpp"
  #include "gc/shared/barrierSet.hpp"
  #include "gc/shared/c1/barrierSetC1.hpp"
  #include "oops/klass.inline.hpp"

*** 3278,12 ***
--- 3279,17 ---
      MethodCounters* counters_adr = method->ensure_method_counters();
      if (counters_adr == nullptr) {
        bailout("method counters allocation failed");
        return;
      }
+ if (SCCache::is_on()) {
+     counter_holder = new_register(T_METADATA);
+     __ metadata2reg(counters_adr, counter_holder);
+ } else {
      counter_holder = new_pointer_register();
      __ move(LIR_OprFact::intptrConst(counters_adr), counter_holder);
+ }
      offset = in_bytes(backedge ? MethodCounters::backedge_counter_offset() :
                                   MethodCounters::invocation_counter_offset());
    } else if (level == CompLevel_full_profile) {
      counter_holder = new_register(T_METADATA);
      offset = in_bytes(backedge ? MethodData::backedge_counter_offset() :
< prev index next >