changeset 20924:03520505cbf1

remove special guards on RegisterPressure
author Doug Simon <doug.simon@oracle.com>
date Tue, 14 Apr 2015 11:59:07 +0200
parents 0e5a0403729c
children cea0b7285190
files graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotReplacementsImpl.java graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/StandardGraphBuilderPlugins.java
diffstat 2 files changed, 10 insertions(+), 26 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotReplacementsImpl.java	Tue Apr 14 11:58:56 2015 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotReplacementsImpl.java	Tue Apr 14 11:59:07 2015 +0200
@@ -27,7 +27,6 @@
 import com.oracle.graal.api.code.*;
 import com.oracle.graal.api.meta.*;
 import com.oracle.graal.api.replacements.*;
-import com.oracle.graal.compiler.common.*;
 import com.oracle.graal.hotspot.replacements.*;
 import com.oracle.graal.hotspot.word.*;
 import com.oracle.graal.phases.util.*;
@@ -68,14 +67,6 @@
             if (!config.useCRC32Intrinsics) {
                 return null;
             }
-        } else if (substituteClass == StringSubstitutions.class) {
-            /*
-             * AMD64's String.equals substitution needs about 8 registers so we better disable the
-             * substitution if there is some register pressure.
-             */
-            if (GraalOptions.RegisterPressure.getValue() != null) {
-                return null;
-            }
         }
         return super.registerMethodSubstitution(cr, originalMethod, substituteMethod);
     }
--- a/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/StandardGraphBuilderPlugins.java	Tue Apr 14 11:58:56 2015 +0200
+++ b/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/StandardGraphBuilderPlugins.java	Tue Apr 14 11:59:07 2015 +0200
@@ -23,7 +23,6 @@
 package com.oracle.graal.replacements;
 
 import static com.oracle.graal.api.code.MemoryBarriers.*;
-import static com.oracle.graal.compiler.common.GraalOptions.*;
 
 import java.lang.reflect.*;
 import java.util.*;
@@ -97,23 +96,17 @@
     }
 
     private static void registerStringPlugins(InvocationPlugins plugins) {
-        /*
-         * AMD64's String.equals substitution needs about 8 registers so we disable it if there is
-         * some artificial register pressure.
-         */
-        if (RegisterPressure.getValue() == null) {
-            Registration r = new Registration(plugins, String.class);
-            r.registerMethodSubstitution(StringSubstitutions.class, "equals", Receiver.class, Object.class);
+        Registration r = new Registration(plugins, String.class);
+        r.registerMethodSubstitution(StringSubstitutions.class, "equals", Receiver.class, Object.class);
 
-            r = new Registration(plugins, StringSubstitutions.class);
-            r.register1("getValue", String.class, new InvocationPlugin() {
-                public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Receiver receiver, ValueNode value) {
-                    ResolvedJavaField field = b.getMetaAccess().lookupJavaField(STRING_VALUE_FIELD);
-                    b.addPush(new LoadFieldNode(value, field));
-                    return true;
-                }
-            });
-        }
+        r = new Registration(plugins, StringSubstitutions.class);
+        r.register1("getValue", String.class, new InvocationPlugin() {
+            public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Receiver receiver, ValueNode value) {
+                ResolvedJavaField field = b.getMetaAccess().lookupJavaField(STRING_VALUE_FIELD);
+                b.addPush(new LoadFieldNode(value, field));
+                return true;
+            }
+        });
     }
 
     private static void registerArraysPlugins(InvocationPlugins plugins) {