Mercurial > hg > graal-compiler
changeset 9264:3df022b2eebe
LowTier phase suite.
author | Roland Schatz <roland.schatz@oracle.com> |
---|---|
date | Tue, 23 Apr 2013 17:49:04 +0200 |
parents | 0ee7c7afdd20 |
children | bff0abdbc8b6 |
files | graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/GraalCompiler.java graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/phases/BasicCompilerConfiguration.java graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/phases/LowTier.java graal/com.oracle.graal.phases/src/com/oracle/graal/phases/tiers/CompilerConfiguration.java graal/com.oracle.graal.phases/src/com/oracle/graal/phases/tiers/LowTierContext.java graal/com.oracle.graal.phases/src/com/oracle/graal/phases/tiers/Suites.java |
diffstat | 6 files changed, 94 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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);
--- 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<MidTierContext> createMidTier() { return new MidTier(); } + + public PhaseSuite<LowTierContext> createLowTier() { + return new LowTier(); + } }
--- /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<LowTierContext> { + + public LowTier() { + } +}
--- 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<HighTierContext> createHighTier(); PhaseSuite<MidTierContext> createMidTier(); + + PhaseSuite<LowTierContext> createLowTier(); }
--- /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; + } +}
--- 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<HighTierContext> highTier; private final PhaseSuite<MidTierContext> midTier; + private final PhaseSuite<LowTierContext> lowTier; private static final Map<String, CompilerConfiguration> configurations; @@ -44,6 +45,10 @@ return midTier; } + public PhaseSuite<LowTierContext> 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() {