Mercurial > hg > truffle
diff graal/com.oracle.graal.compiler.test/src/com/oracle/graal/compiler/test/GraalCompilerTestSubstitutions.java @ 19045:862997951c0a
Add GraalDirectives API to influence compiler behavior.
author | Roland Schatz <roland.schatz@oracle.com> |
---|---|
date | Thu, 29 Jan 2015 16:45:09 +0100 |
parents | cdd0b5d3d9bf |
children |
line wrap: on
line diff
--- a/graal/com.oracle.graal.compiler.test/src/com/oracle/graal/compiler/test/GraalCompilerTestSubstitutions.java Wed Jan 28 12:08:21 2015 +0100 +++ b/graal/com.oracle.graal.compiler.test/src/com/oracle/graal/compiler/test/GraalCompilerTestSubstitutions.java Thu Jan 29 16:45:09 2015 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2015, 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 @@ -24,22 +24,11 @@ import com.oracle.graal.api.replacements.*; import com.oracle.graal.nodes.*; -import com.oracle.graal.nodes.extended.*; @ClassSubstitution(GraalCompilerTest.class) class GraalCompilerTestSubstitutions { @MethodSubstitution - public static boolean branchProbability(double p, boolean cond) { - return BranchProbabilityNode.probability(p, cond); - } - - @MethodSubstitution - public static boolean iterationCount(double i, boolean cond) { - return BranchProbabilityNode.probability(1. - 1. / i, cond); - } - - @MethodSubstitution public static void breakpoint() { BreakpointNode.breakpoint(); }