# HG changeset patch # User Roland Schatz # Date 1366732144 -7200 # Node ID 3df022b2eebe6fd90920954413313fcb0897c854 # Parent 0ee7c7afdd20cc974d519f6fa895079621289d32 LowTier phase suite. diff -r 0ee7c7afdd20 -r 3df022b2eebe graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/GraalCompiler.java --- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/GraalCompiler.java Tue Apr 23 16:56:31 2013 +0200 +++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/GraalCompiler.java Tue Apr 23 17:49:04 2013 +0200 @@ -154,6 +154,9 @@ plan.runPhases(PhasePosition.LOW_LEVEL, graph); + LowTierContext lowTierContext = new LowTierContext(runtime, assumptions, replacements, target); + Suites.DEFAULT.getLowTier().apply(graph, lowTierContext); + new LoweringPhase(target, runtime, replacements, assumptions, LoweringType.AFTER_GUARDS).apply(graph); new FrameStateAssignmentPhase().apply(graph); diff -r 0ee7c7afdd20 -r 3df022b2eebe graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/phases/BasicCompilerConfiguration.java --- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/phases/BasicCompilerConfiguration.java Tue Apr 23 16:56:31 2013 +0200 +++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/phases/BasicCompilerConfiguration.java Tue Apr 23 17:49:04 2013 +0200 @@ -36,4 +36,8 @@ public PhaseSuite createMidTier() { return new MidTier(); } + + public PhaseSuite createLowTier() { + return new LowTier(); + } } diff -r 0ee7c7afdd20 -r 3df022b2eebe graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/phases/LowTier.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/phases/LowTier.java Tue Apr 23 17:49:04 2013 +0200 @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2013, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package com.oracle.graal.compiler.phases; + +import com.oracle.graal.phases.*; +import com.oracle.graal.phases.tiers.*; + +public class LowTier extends PhaseSuite { + + public LowTier() { + } +} diff -r 0ee7c7afdd20 -r 3df022b2eebe graal/com.oracle.graal.phases/src/com/oracle/graal/phases/tiers/CompilerConfiguration.java --- a/graal/com.oracle.graal.phases/src/com/oracle/graal/phases/tiers/CompilerConfiguration.java Tue Apr 23 16:56:31 2013 +0200 +++ b/graal/com.oracle.graal.phases/src/com/oracle/graal/phases/tiers/CompilerConfiguration.java Tue Apr 23 17:49:04 2013 +0200 @@ -29,4 +29,6 @@ PhaseSuite createHighTier(); PhaseSuite createMidTier(); + + PhaseSuite createLowTier(); } diff -r 0ee7c7afdd20 -r 3df022b2eebe graal/com.oracle.graal.phases/src/com/oracle/graal/phases/tiers/LowTierContext.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/graal/com.oracle.graal.phases/src/com/oracle/graal/phases/tiers/LowTierContext.java Tue Apr 23 17:49:04 2013 +0200 @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2013, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package com.oracle.graal.phases.tiers; + +import com.oracle.graal.api.code.*; +import com.oracle.graal.api.meta.*; +import com.oracle.graal.nodes.spi.*; + +public class LowTierContext extends PhaseContext { + + private final Replacements replacements; + private final TargetDescription target; + + public LowTierContext(MetaAccessProvider runtime, Assumptions assumptions, Replacements replacements, TargetDescription target) { + super(runtime, assumptions); + this.replacements = replacements; + this.target = target; + } + + public Replacements getReplacements() { + return replacements; + } + + public TargetDescription getTarget() { + return target; + } +} diff -r 0ee7c7afdd20 -r 3df022b2eebe graal/com.oracle.graal.phases/src/com/oracle/graal/phases/tiers/Suites.java --- a/graal/com.oracle.graal.phases/src/com/oracle/graal/phases/tiers/Suites.java Tue Apr 23 16:56:31 2013 +0200 +++ b/graal/com.oracle.graal.phases/src/com/oracle/graal/phases/tiers/Suites.java Tue Apr 23 17:49:04 2013 +0200 @@ -33,6 +33,7 @@ private final PhaseSuite highTier; private final PhaseSuite midTier; + private final PhaseSuite lowTier; private static final Map configurations; @@ -44,6 +45,10 @@ return midTier; } + public PhaseSuite getLowTier() { + return lowTier; + } + static { configurations = new HashMap<>(); for (CompilerConfiguration config : ServiceLoader.loadInstalled(CompilerConfiguration.class)) { @@ -60,6 +65,7 @@ private Suites(CompilerConfiguration config) { highTier = config.createHighTier(); midTier = config.createMidTier(); + lowTier = config.createLowTier(); } public static Suites createDefaultSuites() {