RFR (XS) 8252362: C2: Remove no-op checking for callee-saved-floats

Aleksey Shipilev shade at redhat.com
Wed Aug 26 08:06:48 UTC 2020


Cleanup:
   https://bugs.openjdk.java.net/browse/JDK-8252362

The block below does not do anything, because there are no side-effects anywhere, and then 
callee_saved_floats is left unused. It is this way since the initial load. I believe C2 (matching) 
code just uses SOE/SOC info from .ad. Anyhow, I cannot find where the rest of runtime codifies 
SOE/SOC registers to check here. There are plenty of hand-enumerated registers in, say, 
macroAssembler-s.

I think it is cleaner to remove the block:

diff -r e12584d50765 src/hotspot/share/opto/c2compiler.cpp
--- a/src/hotspot/share/opto/c2compiler.cpp     Wed Aug 26 09:29:46 2020 +0200
+++ b/src/hotspot/share/opto/c2compiler.cpp     Wed Aug 26 10:02:48 2020 +0200
@@ -64,14 +64,4 @@
    }

-  // Check that runtime and architecture description agree on callee-saved-floats
-  bool callee_saved_floats = false;
-  for( OptoReg::Name i=OptoReg::Name(0); i<OptoReg::Name(_last_Mach_Reg); i = OptoReg::add(i,1) ) {
-    // Is there a callee-saved float or double?
-    if( register_save_policy[i] == 'E' /* callee-saved */ &&
-       (register_save_type[i] == Op_RegF || register_save_type[i] == Op_RegD) ) {
-      callee_saved_floats = true;
-    }
-  }
-
    DEBUG_ONLY( Node::init_NodeProperty(); )

Testing: local tier1

-- 
Thanks,
-Aleksey



More information about the hotspot-compiler-dev mailing list