src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/backend/BackendTest.java
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot Sdiff src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/backend

src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/backend/BackendTest.java

Print this page




  28 import org.graalvm.compiler.core.test.GraalCompilerTest;
  29 import org.graalvm.compiler.debug.Debug;
  30 import org.graalvm.compiler.debug.Debug.Scope;
  31 import org.graalvm.compiler.lir.gen.LIRGenerationResult;
  32 import org.graalvm.compiler.nodes.StructuredGraph;
  33 import org.graalvm.compiler.phases.OptimisticOptimizations;
  34 
  35 public abstract class BackendTest extends GraalCompilerTest {
  36 
  37     public BackendTest() {
  38         super();
  39     }
  40 
  41     public BackendTest(Class<? extends Architecture> arch) {
  42         super(arch);
  43     }
  44 
  45     @SuppressWarnings("try")
  46     protected LIRGenerationResult getLIRGenerationResult(final StructuredGraph graph) {
  47         try (Scope s = Debug.scope("FrontEnd")) {
  48             GraalCompiler.emitFrontEnd(getProviders(), getBackend(), graph, getDefaultGraphBuilderSuite(), OptimisticOptimizations.NONE, graph.getProfilingInfo(), getSuites());
  49         } catch (Throwable e) {
  50             throw Debug.handle(e);
  51         }
  52 
  53         LIRGenerationResult lirGen = GraalCompiler.emitLIR(getBackend(), graph, null, null, getLIRSuites());
  54         return lirGen;
  55     }
  56 
  57 }


  28 import org.graalvm.compiler.core.test.GraalCompilerTest;
  29 import org.graalvm.compiler.debug.Debug;
  30 import org.graalvm.compiler.debug.Debug.Scope;
  31 import org.graalvm.compiler.lir.gen.LIRGenerationResult;
  32 import org.graalvm.compiler.nodes.StructuredGraph;
  33 import org.graalvm.compiler.phases.OptimisticOptimizations;
  34 
  35 public abstract class BackendTest extends GraalCompilerTest {
  36 
  37     public BackendTest() {
  38         super();
  39     }
  40 
  41     public BackendTest(Class<? extends Architecture> arch) {
  42         super(arch);
  43     }
  44 
  45     @SuppressWarnings("try")
  46     protected LIRGenerationResult getLIRGenerationResult(final StructuredGraph graph) {
  47         try (Scope s = Debug.scope("FrontEnd")) {
  48             GraalCompiler.emitFrontEnd(getProviders(), getBackend(), graph, getDefaultGraphBuilderSuite(), OptimisticOptimizations.NONE, graph.getProfilingInfo(), createSuites(graph.getOptions()));
  49         } catch (Throwable e) {
  50             throw Debug.handle(e);
  51         }
  52 
  53         LIRGenerationResult lirGen = GraalCompiler.emitLIR(getBackend(), graph, null, null, createLIRSuites(graph.getOptions()));
  54         return lirGen;
  55     }
  56 
  57 }
src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/backend/BackendTest.java
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File