1 /*
   2  * Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   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
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "jfr/support/jfrIntrinsics.hpp"
  27 #include "opto/c2compiler.hpp"
  28 #include "opto/compile.hpp"
  29 #include "opto/optoreg.hpp"
  30 #include "opto/output.hpp"
  31 #include "opto/runtime.hpp"
  32 #include "utilities/macros.hpp"
  33 
  34 
  35 // register information defined by ADLC
  36 extern const char register_save_policy[];
  37 extern const int  register_save_type[];
  38 
  39 const char* C2Compiler::retry_no_subsuming_loads() {
  40   return "retry without subsuming loads";
  41 }
  42 const char* C2Compiler::retry_no_escape_analysis() {
  43   return "retry without escape analysis";
  44 }
  45 const char* C2Compiler::retry_class_loading_during_parsing() {
  46   return "retry class loading during parsing";
  47 }
  48 bool C2Compiler::init_c2_runtime() {
  49 
  50   // Check assumptions used while running ADLC
  51   Compile::adlc_verification();
  52   assert(REG_COUNT <= ConcreteRegisterImpl::number_of_registers, "incompatible register counts");
  53 
  54   for (int i = 0; i < ConcreteRegisterImpl::number_of_registers ; i++ ) {
  55       OptoReg::vm2opto[i] = OptoReg::Bad;
  56   }
  57 
  58   for( OptoReg::Name i=OptoReg::Name(0); i<OptoReg::Name(REG_COUNT); i = OptoReg::add(i,1) ) {
  59     VMReg r = OptoReg::as_VMReg(i);
  60     if (r->is_valid()) {
  61       OptoReg::vm2opto[r->value()] = i;
  62     }
  63   }
  64 
  65   // Check that runtime and architecture description agree on callee-saved-floats
  66   bool callee_saved_floats = false;
  67   for( OptoReg::Name i=OptoReg::Name(0); i<OptoReg::Name(_last_Mach_Reg); i = OptoReg::add(i,1) ) {
  68     // Is there a callee-saved float or double?
  69     if( register_save_policy[i] == 'E' /* callee-saved */ &&
  70        (register_save_type[i] == Op_RegF || register_save_type[i] == Op_RegD) ) {
  71       callee_saved_floats = true;
  72     }
  73   }
  74 
  75   DEBUG_ONLY( Node::init_NodeProperty(); )
  76 
  77   Compile::pd_compiler2_init();
  78 
  79   CompilerThread* thread = CompilerThread::current();
  80 
  81   HandleMark handle_mark(thread);
  82   return OptoRuntime::generate(thread->env());
  83 }
  84 
  85 void C2Compiler::initialize() {
  86   // The first compiler thread that gets here will initialize the
  87   // small amount of global state (and runtime stubs) that C2 needs.
  88 
  89   // There is a race possible once at startup and then we're fine
  90 
  91   // Note that this is being called from a compiler thread not the
  92   // main startup thread.
  93   if (should_perform_init()) {
  94     bool successful = C2Compiler::init_c2_runtime();
  95     int new_state = (successful) ? initialized : failed;
  96     set_state(new_state);
  97   }
  98 }
  99 
 100 void C2Compiler::compile_method(ciEnv* env, ciMethod* target, int entry_bci, DirectiveSet* directive) {
 101   assert(is_initialized(), "Compiler thread must be initialized");
 102 
 103   bool subsume_loads = SubsumeLoads;
 104   bool do_escape_analysis = DoEscapeAnalysis && !env->should_retain_local_variables();
 105   bool eliminate_boxing = EliminateAutoBox;
 106 
 107   while (!env->failing()) {
 108     // Attempt to compile while subsuming loads into machine instructions.
 109     Compile C(env, this, target, entry_bci, subsume_loads, do_escape_analysis, eliminate_boxing, directive);
 110 
 111     // Check result and retry if appropriate.
 112     if (C.failure_reason() != NULL) {
 113       if (C.failure_reason_is(retry_class_loading_during_parsing())) {
 114         env->report_failure(C.failure_reason());
 115         continue;  // retry
 116       }
 117       if (C.failure_reason_is(retry_no_subsuming_loads())) {
 118         assert(subsume_loads, "must make progress");
 119         subsume_loads = false;
 120         env->report_failure(C.failure_reason());
 121         continue;  // retry
 122       }
 123       if (C.failure_reason_is(retry_no_escape_analysis())) {
 124         assert(do_escape_analysis, "must make progress");
 125         do_escape_analysis = false;
 126         env->report_failure(C.failure_reason());
 127         continue;  // retry
 128       }
 129       if (C.has_boxed_value()) {
 130         // Recompile without boxing elimination regardless failure reason.
 131         assert(eliminate_boxing, "must make progress");
 132         eliminate_boxing = false;
 133         env->report_failure(C.failure_reason());
 134         continue;  // retry
 135       }
 136       // Pass any other failure reason up to the ciEnv.
 137       // Note that serious, irreversible failures are already logged
 138       // on the ciEnv via env->record_method_not_compilable().
 139       env->record_failure(C.failure_reason());
 140     }
 141     if (StressRecompilation) {
 142       if (subsume_loads) {
 143         subsume_loads = false;
 144         continue;  // retry
 145       }
 146       if (do_escape_analysis) {
 147         do_escape_analysis = false;
 148         continue;  // retry
 149       }
 150     }
 151 
 152     // print inlining for last compilation only
 153     C.dump_print_inlining();
 154 
 155     // No retry; just break the loop.
 156     break;
 157   }
 158 }
 159 
 160 void C2Compiler::print_timers() {
 161   Compile::print_timers();
 162 }
 163 
 164 bool C2Compiler::is_intrinsic_supported(const methodHandle& method, bool is_virtual) {
 165   vmIntrinsics::ID id = method->intrinsic_id();
 166   assert(id != vmIntrinsics::_none, "must be a VM intrinsic");
 167 
 168   if (id < vmIntrinsics::FIRST_ID || id > vmIntrinsics::LAST_COMPILER_INLINE) {
 169     return false;
 170   }
 171 
 172   // Only Object.hashCode and Object.clone intrinsics implement also a virtual
 173   // dispatch because calling both methods is expensive but both methods are
 174   // frequently overridden. All other intrinsics implement only a non-virtual
 175   // dispatch.
 176   if (is_virtual) {
 177     switch (id) {
 178     case vmIntrinsics::_hashCode:
 179     case vmIntrinsics::_clone:
 180       break;
 181     default:
 182       return false;
 183     }
 184   }
 185 
 186   switch (id) {
 187   case vmIntrinsics::_compressStringC:
 188   case vmIntrinsics::_compressStringB:
 189     if (!Matcher::has_match_rule(Op_StrCompressedCopy)) return false;
 190     break;
 191   case vmIntrinsics::_inflateStringC:
 192   case vmIntrinsics::_inflateStringB:
 193     if (!Matcher::has_match_rule(Op_StrInflatedCopy)) return false;
 194     break;
 195   case vmIntrinsics::_compareToL:
 196   case vmIntrinsics::_compareToU:
 197   case vmIntrinsics::_compareToLU:
 198   case vmIntrinsics::_compareToUL:
 199     if (!Matcher::match_rule_supported(Op_StrComp)) return false;
 200     break;
 201   case vmIntrinsics::_equalsL:
 202   case vmIntrinsics::_equalsU:
 203     if (!Matcher::match_rule_supported(Op_StrEquals)) return false;
 204     break;
 205   case vmIntrinsics::_equalsB:
 206   case vmIntrinsics::_equalsC:
 207     if (!Matcher::match_rule_supported(Op_AryEq)) return false;
 208     break;
 209   case vmIntrinsics::_copyMemory:
 210     if (StubRoutines::unsafe_arraycopy() == NULL) return false;
 211     break;
 212   case vmIntrinsics::_encodeISOArray:
 213   case vmIntrinsics::_encodeByteISOArray:
 214     if (!Matcher::match_rule_supported(Op_EncodeISOArray)) return false;
 215     break;
 216   case vmIntrinsics::_hasNegatives:
 217     if (!Matcher::match_rule_supported(Op_HasNegatives))  return false;
 218     break;
 219   case vmIntrinsics::_bitCount_i:
 220     if (!Matcher::match_rule_supported(Op_PopCountI)) return false;
 221     break;
 222   case vmIntrinsics::_bitCount_l:
 223     if (!Matcher::match_rule_supported(Op_PopCountL)) return false;
 224     break;
 225   case vmIntrinsics::_numberOfLeadingZeros_i:
 226     if (!Matcher::match_rule_supported(Op_CountLeadingZerosI)) return false;
 227     break;
 228   case vmIntrinsics::_numberOfLeadingZeros_l:
 229     if (!Matcher::match_rule_supported(Op_CountLeadingZerosL)) return false;
 230     break;
 231   case vmIntrinsics::_numberOfTrailingZeros_i:
 232     if (!Matcher::match_rule_supported(Op_CountTrailingZerosI)) return false;
 233     break;
 234   case vmIntrinsics::_numberOfTrailingZeros_l:
 235     if (!Matcher::match_rule_supported(Op_CountTrailingZerosL)) return false;
 236     break;
 237   case vmIntrinsics::_reverseBytes_c:
 238     if (!Matcher::match_rule_supported(Op_ReverseBytesUS)) return false;
 239     break;
 240   case vmIntrinsics::_reverseBytes_s:
 241     if (!Matcher::match_rule_supported(Op_ReverseBytesS)) return false;
 242     break;
 243   case vmIntrinsics::_reverseBytes_i:
 244     if (!Matcher::match_rule_supported(Op_ReverseBytesI)) return false;
 245     break;
 246   case vmIntrinsics::_reverseBytes_l:
 247     if (!Matcher::match_rule_supported(Op_ReverseBytesL)) return false;
 248     break;
 249 
 250   /* CompareAndSet, Object: */
 251   case vmIntrinsics::_compareAndSetObject:
 252 #ifdef _LP64
 253     if ( UseCompressedOops && !Matcher::match_rule_supported(Op_CompareAndSwapN)) return false;
 254     if (!UseCompressedOops && !Matcher::match_rule_supported(Op_CompareAndSwapP)) return false;
 255 #else
 256     if (!Matcher::match_rule_supported(Op_CompareAndSwapP)) return false;
 257 #endif
 258     break;
 259   case vmIntrinsics::_weakCompareAndSetObjectPlain:
 260   case vmIntrinsics::_weakCompareAndSetObjectAcquire:
 261   case vmIntrinsics::_weakCompareAndSetObjectRelease:
 262   case vmIntrinsics::_weakCompareAndSetObject:
 263 #ifdef _LP64
 264     if ( UseCompressedOops && !Matcher::match_rule_supported(Op_WeakCompareAndSwapN)) return false;
 265     if (!UseCompressedOops && !Matcher::match_rule_supported(Op_WeakCompareAndSwapP)) return false;
 266 #else
 267     if (!Matcher::match_rule_supported(Op_WeakCompareAndSwapP)) return false;
 268 #endif
 269     break;
 270   /* CompareAndSet, Long: */
 271   case vmIntrinsics::_compareAndSetLong:
 272     if (!Matcher::match_rule_supported(Op_CompareAndSwapL)) return false;
 273     break;
 274   case vmIntrinsics::_weakCompareAndSetLongPlain:
 275   case vmIntrinsics::_weakCompareAndSetLongAcquire:
 276   case vmIntrinsics::_weakCompareAndSetLongRelease:
 277   case vmIntrinsics::_weakCompareAndSetLong:
 278     if (!Matcher::match_rule_supported(Op_WeakCompareAndSwapL)) return false;
 279     break;
 280 
 281   /* CompareAndSet, Int: */
 282   case vmIntrinsics::_compareAndSetInt:
 283     if (!Matcher::match_rule_supported(Op_CompareAndSwapI)) return false;
 284     break;
 285   case vmIntrinsics::_weakCompareAndSetIntPlain:
 286   case vmIntrinsics::_weakCompareAndSetIntAcquire:
 287   case vmIntrinsics::_weakCompareAndSetIntRelease:
 288   case vmIntrinsics::_weakCompareAndSetInt:
 289     if (!Matcher::match_rule_supported(Op_WeakCompareAndSwapI)) return false;
 290     break;
 291 
 292   /* CompareAndSet, Byte: */
 293   case vmIntrinsics::_compareAndSetByte:
 294     if (!Matcher::match_rule_supported(Op_CompareAndSwapB)) return false;
 295     break;
 296   case vmIntrinsics::_weakCompareAndSetBytePlain:
 297   case vmIntrinsics::_weakCompareAndSetByteAcquire:
 298   case vmIntrinsics::_weakCompareAndSetByteRelease:
 299   case vmIntrinsics::_weakCompareAndSetByte:
 300     if (!Matcher::match_rule_supported(Op_WeakCompareAndSwapB)) return false;
 301     break;
 302 
 303   /* CompareAndSet, Short: */
 304   case vmIntrinsics::_compareAndSetShort:
 305     if (!Matcher::match_rule_supported(Op_CompareAndSwapS)) return false;
 306     break;
 307   case vmIntrinsics::_weakCompareAndSetShortPlain:
 308   case vmIntrinsics::_weakCompareAndSetShortAcquire:
 309   case vmIntrinsics::_weakCompareAndSetShortRelease:
 310   case vmIntrinsics::_weakCompareAndSetShort:
 311     if (!Matcher::match_rule_supported(Op_WeakCompareAndSwapS)) return false;
 312     break;
 313 
 314   /* CompareAndExchange, Object: */
 315   case vmIntrinsics::_compareAndExchangeObject:
 316   case vmIntrinsics::_compareAndExchangeObjectAcquire:
 317   case vmIntrinsics::_compareAndExchangeObjectRelease:
 318 #ifdef _LP64
 319     if ( UseCompressedOops && !Matcher::match_rule_supported(Op_CompareAndExchangeN)) return false;
 320     if (!UseCompressedOops && !Matcher::match_rule_supported(Op_CompareAndExchangeP)) return false;
 321 #else
 322     if (!Matcher::match_rule_supported(Op_CompareAndExchangeP)) return false;
 323 #endif
 324     break;
 325 
 326   /* CompareAndExchange, Long: */
 327   case vmIntrinsics::_compareAndExchangeLong:
 328   case vmIntrinsics::_compareAndExchangeLongAcquire:
 329   case vmIntrinsics::_compareAndExchangeLongRelease:
 330     if (!Matcher::match_rule_supported(Op_CompareAndExchangeL)) return false;
 331     break;
 332 
 333   /* CompareAndExchange, Int: */
 334   case vmIntrinsics::_compareAndExchangeInt:
 335   case vmIntrinsics::_compareAndExchangeIntAcquire:
 336   case vmIntrinsics::_compareAndExchangeIntRelease:
 337     if (!Matcher::match_rule_supported(Op_CompareAndExchangeI)) return false;
 338     break;
 339 
 340   /* CompareAndExchange, Byte: */
 341   case vmIntrinsics::_compareAndExchangeByte:
 342   case vmIntrinsics::_compareAndExchangeByteAcquire:
 343   case vmIntrinsics::_compareAndExchangeByteRelease:
 344     if (!Matcher::match_rule_supported(Op_CompareAndExchangeB)) return false;
 345     break;
 346 
 347   /* CompareAndExchange, Short: */
 348   case vmIntrinsics::_compareAndExchangeShort:
 349   case vmIntrinsics::_compareAndExchangeShortAcquire:
 350   case vmIntrinsics::_compareAndExchangeShortRelease:
 351     if (!Matcher::match_rule_supported(Op_CompareAndExchangeS)) return false;
 352     break;
 353 
 354   case vmIntrinsics::_getAndAddByte:
 355     if (!Matcher::match_rule_supported(Op_GetAndAddB)) return false;
 356     break;
 357   case vmIntrinsics::_getAndAddShort:
 358     if (!Matcher::match_rule_supported(Op_GetAndAddS)) return false;
 359     break;
 360   case vmIntrinsics::_getAndAddInt:
 361     if (!Matcher::match_rule_supported(Op_GetAndAddI)) return false;
 362     break;
 363   case vmIntrinsics::_getAndAddLong:
 364     if (!Matcher::match_rule_supported(Op_GetAndAddL)) return false;
 365     break;
 366 
 367   case vmIntrinsics::_getAndSetByte:
 368     if (!Matcher::match_rule_supported(Op_GetAndSetB)) return false;
 369     break;
 370   case vmIntrinsics::_getAndSetShort:
 371     if (!Matcher::match_rule_supported(Op_GetAndSetS)) return false;
 372     break;
 373   case vmIntrinsics::_getAndSetInt:
 374     if (!Matcher::match_rule_supported(Op_GetAndSetI)) return false;
 375     break;
 376   case vmIntrinsics::_getAndSetLong:
 377     if (!Matcher::match_rule_supported(Op_GetAndSetL)) return false;
 378     break;
 379   case vmIntrinsics::_getAndSetObject:
 380 #ifdef _LP64
 381     if (!UseCompressedOops && !Matcher::match_rule_supported(Op_GetAndSetP)) return false;
 382     if (UseCompressedOops && !Matcher::match_rule_supported(Op_GetAndSetN)) return false;
 383     break;
 384 #else
 385     if (!Matcher::match_rule_supported(Op_GetAndSetP)) return false;
 386     break;
 387 #endif
 388   case vmIntrinsics::_incrementExactI:
 389   case vmIntrinsics::_addExactI:
 390     if (!Matcher::match_rule_supported(Op_OverflowAddI)) return false;
 391     break;
 392   case vmIntrinsics::_incrementExactL:
 393   case vmIntrinsics::_addExactL:
 394     if (!Matcher::match_rule_supported(Op_OverflowAddL)) return false;
 395     break;
 396   case vmIntrinsics::_decrementExactI:
 397   case vmIntrinsics::_subtractExactI:
 398     if (!Matcher::match_rule_supported(Op_OverflowSubI)) return false;
 399     break;
 400   case vmIntrinsics::_decrementExactL:
 401   case vmIntrinsics::_subtractExactL:
 402     if (!Matcher::match_rule_supported(Op_OverflowSubL)) return false;
 403     break;
 404   case vmIntrinsics::_negateExactI:
 405     if (!Matcher::match_rule_supported(Op_OverflowSubI)) return false;
 406     break;
 407   case vmIntrinsics::_negateExactL:
 408     if (!Matcher::match_rule_supported(Op_OverflowSubL)) return false;
 409     break;
 410   case vmIntrinsics::_multiplyExactI:
 411     if (!Matcher::match_rule_supported(Op_OverflowMulI)) return false;
 412     break;
 413   case vmIntrinsics::_multiplyExactL:
 414     if (!Matcher::match_rule_supported(Op_OverflowMulL)) return false;
 415     break;
 416   case vmIntrinsics::_multiplyHigh:
 417     if (!Matcher::match_rule_supported(Op_MulHiL)) return false;
 418     break;
 419   case vmIntrinsics::_getCallerClass:
 420     if (SystemDictionary::reflect_CallerSensitive_klass() == NULL) return false;
 421     break;
 422   case vmIntrinsics::_onSpinWait:
 423     if (!Matcher::match_rule_supported(Op_OnSpinWait)) return false;
 424     break;
 425   case vmIntrinsics::_fmaD:
 426     if (!UseFMA || !Matcher::match_rule_supported(Op_FmaD)) return false;
 427     break;
 428   case vmIntrinsics::_fmaF:
 429     if (!UseFMA || !Matcher::match_rule_supported(Op_FmaF)) return false;
 430     break;
 431   case vmIntrinsics::_hashCode:
 432   case vmIntrinsics::_identityHashCode:
 433   case vmIntrinsics::_getClass:
 434   case vmIntrinsics::_dsin:
 435   case vmIntrinsics::_dcos:
 436   case vmIntrinsics::_dtan:
 437   case vmIntrinsics::_dabs:
 438   case vmIntrinsics::_datan2:
 439   case vmIntrinsics::_dsqrt:
 440   case vmIntrinsics::_dexp:
 441   case vmIntrinsics::_dlog:
 442   case vmIntrinsics::_dlog10:
 443   case vmIntrinsics::_dpow:
 444   case vmIntrinsics::_min:
 445   case vmIntrinsics::_max:
 446   case vmIntrinsics::_arraycopy:
 447   case vmIntrinsics::_indexOfL:
 448   case vmIntrinsics::_indexOfU:
 449   case vmIntrinsics::_indexOfUL:
 450   case vmIntrinsics::_indexOfIL:
 451   case vmIntrinsics::_indexOfIU:
 452   case vmIntrinsics::_indexOfIUL:
 453   case vmIntrinsics::_indexOfU_char:
 454   case vmIntrinsics::_toBytesStringU:
 455   case vmIntrinsics::_getCharsStringU:
 456   case vmIntrinsics::_getCharStringU:
 457   case vmIntrinsics::_putCharStringU:
 458   case vmIntrinsics::_getObject:
 459   case vmIntrinsics::_getBoolean:
 460   case vmIntrinsics::_getByte:
 461   case vmIntrinsics::_getShort:
 462   case vmIntrinsics::_getChar:
 463   case vmIntrinsics::_getInt:
 464   case vmIntrinsics::_getLong:
 465   case vmIntrinsics::_getFloat:
 466   case vmIntrinsics::_getDouble:
 467   case vmIntrinsics::_putObject:
 468   case vmIntrinsics::_putBoolean:
 469   case vmIntrinsics::_putByte:
 470   case vmIntrinsics::_putShort:
 471   case vmIntrinsics::_putChar:
 472   case vmIntrinsics::_putInt:
 473   case vmIntrinsics::_putLong:
 474   case vmIntrinsics::_putFloat:
 475   case vmIntrinsics::_putDouble:
 476   case vmIntrinsics::_getObjectVolatile:
 477   case vmIntrinsics::_getBooleanVolatile:
 478   case vmIntrinsics::_getByteVolatile:
 479   case vmIntrinsics::_getShortVolatile:
 480   case vmIntrinsics::_getCharVolatile:
 481   case vmIntrinsics::_getIntVolatile:
 482   case vmIntrinsics::_getLongVolatile:
 483   case vmIntrinsics::_getFloatVolatile:
 484   case vmIntrinsics::_getDoubleVolatile:
 485   case vmIntrinsics::_putObjectVolatile:
 486   case vmIntrinsics::_putBooleanVolatile:
 487   case vmIntrinsics::_putByteVolatile:
 488   case vmIntrinsics::_putShortVolatile:
 489   case vmIntrinsics::_putCharVolatile:
 490   case vmIntrinsics::_putIntVolatile:
 491   case vmIntrinsics::_putLongVolatile:
 492   case vmIntrinsics::_putFloatVolatile:
 493   case vmIntrinsics::_putDoubleVolatile:
 494   case vmIntrinsics::_getObjectAcquire:
 495   case vmIntrinsics::_getBooleanAcquire:
 496   case vmIntrinsics::_getByteAcquire:
 497   case vmIntrinsics::_getShortAcquire:
 498   case vmIntrinsics::_getCharAcquire:
 499   case vmIntrinsics::_getIntAcquire:
 500   case vmIntrinsics::_getLongAcquire:
 501   case vmIntrinsics::_getFloatAcquire:
 502   case vmIntrinsics::_getDoubleAcquire:
 503   case vmIntrinsics::_putObjectRelease:
 504   case vmIntrinsics::_putBooleanRelease:
 505   case vmIntrinsics::_putByteRelease:
 506   case vmIntrinsics::_putShortRelease:
 507   case vmIntrinsics::_putCharRelease:
 508   case vmIntrinsics::_putIntRelease:
 509   case vmIntrinsics::_putLongRelease:
 510   case vmIntrinsics::_putFloatRelease:
 511   case vmIntrinsics::_putDoubleRelease:
 512   case vmIntrinsics::_getObjectOpaque:
 513   case vmIntrinsics::_getBooleanOpaque:
 514   case vmIntrinsics::_getByteOpaque:
 515   case vmIntrinsics::_getShortOpaque:
 516   case vmIntrinsics::_getCharOpaque:
 517   case vmIntrinsics::_getIntOpaque:
 518   case vmIntrinsics::_getLongOpaque:
 519   case vmIntrinsics::_getFloatOpaque:
 520   case vmIntrinsics::_getDoubleOpaque:
 521   case vmIntrinsics::_putObjectOpaque:
 522   case vmIntrinsics::_putBooleanOpaque:
 523   case vmIntrinsics::_putByteOpaque:
 524   case vmIntrinsics::_putShortOpaque:
 525   case vmIntrinsics::_putCharOpaque:
 526   case vmIntrinsics::_putIntOpaque:
 527   case vmIntrinsics::_putLongOpaque:
 528   case vmIntrinsics::_putFloatOpaque:
 529   case vmIntrinsics::_putDoubleOpaque:
 530   case vmIntrinsics::_getShortUnaligned:
 531   case vmIntrinsics::_getCharUnaligned:
 532   case vmIntrinsics::_getIntUnaligned:
 533   case vmIntrinsics::_getLongUnaligned:
 534   case vmIntrinsics::_putShortUnaligned:
 535   case vmIntrinsics::_putCharUnaligned:
 536   case vmIntrinsics::_putIntUnaligned:
 537   case vmIntrinsics::_putLongUnaligned:
 538   case vmIntrinsics::_loadFence:
 539   case vmIntrinsics::_storeFence:
 540   case vmIntrinsics::_fullFence:
 541   case vmIntrinsics::_currentThread:
 542   case vmIntrinsics::_isInterrupted:
 543 #ifdef JFR_HAVE_INTRINSICS
 544   case vmIntrinsics::_counterTime:
 545   case vmIntrinsics::_getClassId:
 546   case vmIntrinsics::_getEventWriter:
 547 #endif
 548   case vmIntrinsics::_currentTimeMillis:
 549   case vmIntrinsics::_nanoTime:
 550   case vmIntrinsics::_allocateInstance:
 551   case vmIntrinsics::_allocateUninitializedArray:
 552   case vmIntrinsics::_newArray:
 553   case vmIntrinsics::_getLength:
 554   case vmIntrinsics::_copyOf:
 555   case vmIntrinsics::_copyOfRange:
 556   case vmIntrinsics::_clone:
 557   case vmIntrinsics::_isAssignableFrom:
 558   case vmIntrinsics::_isInstance:
 559   case vmIntrinsics::_getModifiers:
 560   case vmIntrinsics::_isInterface:
 561   case vmIntrinsics::_isArray:
 562   case vmIntrinsics::_isPrimitive:
 563   case vmIntrinsics::_getSuperclass:
 564   case vmIntrinsics::_getClassAccessFlags:
 565   case vmIntrinsics::_floatToRawIntBits:
 566   case vmIntrinsics::_floatToIntBits:
 567   case vmIntrinsics::_intBitsToFloat:
 568   case vmIntrinsics::_doubleToRawLongBits:
 569   case vmIntrinsics::_doubleToLongBits:
 570   case vmIntrinsics::_longBitsToDouble:
 571   case vmIntrinsics::_Reference_get:
 572   case vmIntrinsics::_Class_cast:
 573   case vmIntrinsics::_aescrypt_encryptBlock:
 574   case vmIntrinsics::_aescrypt_decryptBlock:
 575   case vmIntrinsics::_cipherBlockChaining_encryptAESCrypt:
 576   case vmIntrinsics::_cipherBlockChaining_decryptAESCrypt:
 577   case vmIntrinsics::_counterMode_AESCrypt:
 578   case vmIntrinsics::_sha_implCompress:
 579   case vmIntrinsics::_sha2_implCompress:
 580   case vmIntrinsics::_sha5_implCompress:

 581   case vmIntrinsics::_digestBase_implCompressMB:

 582   case vmIntrinsics::_multiplyToLen:
 583   case vmIntrinsics::_squareToLen:
 584   case vmIntrinsics::_mulAdd:
 585   case vmIntrinsics::_montgomeryMultiply:
 586   case vmIntrinsics::_montgomerySquare:
 587   case vmIntrinsics::_vectorizedMismatch:
 588   case vmIntrinsics::_ghash_processBlocks:
 589   case vmIntrinsics::_base64_encodeBlock:
 590   case vmIntrinsics::_updateCRC32:
 591   case vmIntrinsics::_updateBytesCRC32:
 592   case vmIntrinsics::_updateByteBufferCRC32:
 593   case vmIntrinsics::_updateBytesCRC32C:
 594   case vmIntrinsics::_updateDirectByteBufferCRC32C:
 595   case vmIntrinsics::_updateBytesAdler32:
 596   case vmIntrinsics::_updateByteBufferAdler32:
 597   case vmIntrinsics::_profileBoolean:
 598   case vmIntrinsics::_isCompileConstant:
 599   case vmIntrinsics::_Preconditions_checkIndex:
 600     break;
 601   default:
 602     return false;
 603   }
 604   return true;
 605 }
 606 
 607 int C2Compiler::initial_code_buffer_size() {
 608   assert(SegmentedCodeCache, "Should be only used with a segmented code cache");
 609   return Compile::MAX_inst_size + Compile::MAX_locs_size + initial_const_capacity;
 610 }
--- EOF ---