changeset 57444:5d4bf79ce2cb

8236000: VM build without C2 fails Summary: C2 flags should be checked only when C2 is present. Reviewed-by: kbarrett, thartmann
author kvn
date Wed, 18 Dec 2019 12:32:34 -0800
parents 169e9680821c
children 75931341b227
files src/hotspot/share/gc/shared/genCollectedHeap.cpp src/hotspot/share/gc/z/zRootsIterator.cpp src/hotspot/share/jvmci/jvmci_globals.cpp src/hotspot/share/runtime/deoptimization.cpp
diffstat 4 files changed, 16 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/hotspot/share/gc/shared/genCollectedHeap.cpp	Wed Dec 18 12:10:09 2019 -0800
+++ b/src/hotspot/share/gc/shared/genCollectedHeap.cpp	Wed Dec 18 12:32:34 2019 -0800
@@ -472,7 +472,7 @@
     HandleMark hm;  // Discard invalid handles created during verification
     Universe::verify("Before GC");
   }
-  COMPILER2_PRESENT(DerivedPointerTable::clear());
+  COMPILER2_OR_JVMCI_PRESENT(DerivedPointerTable::clear());
 
   if (restore_marks_for_biased_locking) {
     // We perform this mark word preservation work lazily
@@ -520,7 +520,7 @@
     rp->verify_no_references_recorded();
   }
 
-  COMPILER2_PRESENT(DerivedPointerTable::update_pointers());
+  COMPILER2_OR_JVMCI_PRESENT(DerivedPointerTable::update_pointers());
 
   gen->stat_record()->accumulated_time.stop();
 
--- a/src/hotspot/share/gc/z/zRootsIterator.cpp	Wed Dec 18 12:10:09 2019 -0800
+++ b/src/hotspot/share/gc/z/zRootsIterator.cpp	Wed Dec 18 12:32:34 2019 -0800
@@ -190,7 +190,7 @@
   assert(SafepointSynchronize::is_at_safepoint(), "Should be at safepoint");
   ZStatTimer timer(ZSubPhasePauseRootsSetup);
   Threads::change_thread_claim_token();
-  COMPILER2_PRESENT(DerivedPointerTable::clear());
+  COMPILER2_OR_JVMCI_PRESENT(DerivedPointerTable::clear());
   if (ClassUnloading) {
     nmethod::oops_do_marking_prologue();
   } else {
@@ -207,7 +207,7 @@
     ZNMethod::oops_do_end();
   }
 
-  COMPILER2_PRESENT(DerivedPointerTable::update_pointers());
+  COMPILER2_OR_JVMCI_PRESENT(DerivedPointerTable::update_pointers());
   Threads::assert_all_threads_claimed();
 }
 
--- a/src/hotspot/share/jvmci/jvmci_globals.cpp	Wed Dec 18 12:10:09 2019 -0800
+++ b/src/hotspot/share/jvmci/jvmci_globals.cpp	Wed Dec 18 12:32:34 2019 -0800
@@ -114,6 +114,16 @@
   CHECK_NOT_SET(JVMCILibPath,                 EnableJVMCI)
   CHECK_NOT_SET(JVMCILibDumpJNIConfig,        EnableJVMCI)
 
+#ifndef COMPILER2
+  JVMCI_FLAG_CHECKED(MaxVectorSize)
+  JVMCI_FLAG_CHECKED(ReduceInitialCardMarks)
+  JVMCI_FLAG_CHECKED(UseMultiplyToLenIntrinsic)
+  JVMCI_FLAG_CHECKED(UseSquareToLenIntrinsic)
+  JVMCI_FLAG_CHECKED(UseMulAddIntrinsic)
+  JVMCI_FLAG_CHECKED(UseMontgomeryMultiplyIntrinsic)
+  JVMCI_FLAG_CHECKED(UseMontgomerySquareIntrinsic)
+#endif // !COMPILER2
+
 #ifndef PRODUCT
 #define JVMCI_CHECK4(type, name, value, doc) assert(name##checked, #name " flag not checked");
 #define JVMCI_CHECK3(type, name, doc)        assert(name##checked, #name " flag not checked");
--- a/src/hotspot/share/runtime/deoptimization.cpp	Wed Dec 18 12:10:09 2019 -0800
+++ b/src/hotspot/share/runtime/deoptimization.cpp	Wed Dec 18 12:32:34 2019 -0800
@@ -302,7 +302,7 @@
 
   // Reallocate the non-escaping objects and restore their fields. Then
   // relock objects if synchronization on them was eliminated.
-  if (jvmci_enabled || (DoEscapeAnalysis && EliminateAllocations)) {
+  if (jvmci_enabled COMPILER2_PRESENT( || (DoEscapeAnalysis && EliminateAllocations) )) {
     realloc_failures = eliminate_allocations(thread, exec_mode, cm, deoptee, map, chunk);
   }
 #endif // COMPILER2_OR_JVMCI
@@ -318,7 +318,7 @@
   NoSafepointVerifier no_safepoint;
 
 #if COMPILER2_OR_JVMCI
-  if (jvmci_enabled || ((DoEscapeAnalysis || EliminateNestedLocks) && EliminateLocks)) {
+  if (jvmci_enabled COMPILER2_PRESENT( || ((DoEscapeAnalysis || EliminateNestedLocks) && EliminateLocks) )) {
     eliminate_locks(thread, chunk, realloc_failures);
   }
 #endif // COMPILER2_OR_JVMCI