changeset 23285:3b75fbfda415

Put SPARCSubIntCanonicalization before SchedulePhase
author Stefan Anzinger <stefan.anzinger@oracle.com>
date Mon, 11 Jan 2016 13:43:59 +0100
parents 8257baff2f0d
children 0a44b12e9b06
files graal/com.oracle.graal.compiler.sparc/src/com/oracle/graal/compiler/sparc/SPARCSuitesProvider.java
diffstat 1 files changed, 9 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.compiler.sparc/src/com/oracle/graal/compiler/sparc/SPARCSuitesProvider.java	Fri Jan 08 17:46:00 2016 -0800
+++ b/graal/com.oracle.graal.compiler.sparc/src/com/oracle/graal/compiler/sparc/SPARCSuitesProvider.java	Mon Jan 11 13:43:59 2016 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -22,9 +22,14 @@
  */
 package com.oracle.graal.compiler.sparc;
 
+import java.util.ListIterator;
+
 import com.oracle.graal.java.DefaultSuitesProvider;
 import com.oracle.graal.nodes.graphbuilderconf.GraphBuilderConfiguration.Plugins;
+import com.oracle.graal.phases.BasePhase;
+import com.oracle.graal.phases.schedule.SchedulePhase;
 import com.oracle.graal.phases.tiers.CompilerConfiguration;
+import com.oracle.graal.phases.tiers.LowTierContext;
 import com.oracle.graal.phases.tiers.Suites;
 
 public class SPARCSuitesProvider extends DefaultSuitesProvider {
@@ -35,7 +40,9 @@
     @Override
     public Suites createSuites() {
         Suites s = super.createSuites();
-        s.getLowTier().appendPhase(new SPARCSubIntCompareCanonicalizationPhase());
+        ListIterator<BasePhase<? super LowTierContext>> l = s.getLowTier().findPhase(SchedulePhase.class);
+        l.previous();
+        l.add(new SPARCSubIntCompareCanonicalizationPhase());
         return s;
     }
 }