use of org.graalvm.compiler.truffle.runtime.TruffleInlining in project graal by oracle.
the class BasicTruffleInliningTest method testRecursiveInline.
@Test
public void testRecursiveInline() {
TruffleInlining decisions = builder.target("recursive").calls("recursive").buildDecisions();
Assert.assertEquals(TruffleCompilerOptions.getValue(TruffleMaximumRecursiveInlining).intValue(), countInlines(decisions, "recursive"));
}
use of org.graalvm.compiler.truffle.runtime.TruffleInlining in project graal by oracle.
the class BasicTruffleInliningTest method testIndirectRecursiveInline.
@Test
public void testIndirectRecursiveInline() {
// @formatter:off
TruffleInlining decisions = builder.target("callee").calls("recursive").target("recursive").calls("callee").buildDecisions();
// @formatter:on
Assert.assertEquals(TruffleCompilerOptions.getValue(TruffleMaximumRecursiveInlining).intValue(), countInlines(decisions, "recursive"));
Assert.assertEquals(TruffleCompilerOptions.getValue(TruffleMaximumRecursiveInlining) + 1, countInlines(decisions, "callee"));
}
use of org.graalvm.compiler.truffle.runtime.TruffleInlining in project graal by oracle.
the class BasicTruffleInliningTest method testInlineIntoBigFunctions.
@Test
public void testInlineIntoBigFunctions() {
// @formatter:off
TruffleInlining decisions = builder.target("callee").target("caller", TruffleCompilerOptions.getValue(TruffleInliningMaxCallerSize) - 3).calls("callee").buildDecisions();
// @formatter:on
assertInlined(decisions, "callee");
}
use of org.graalvm.compiler.truffle.runtime.TruffleInlining in project graal by oracle.
the class BasicTruffleInliningTest method testWideInline.
@Test
public void testWideInline() {
int width = 1000;
builder.target("leaf").target("main");
for (Integer i = 0; i < width; i++) {
builder.calls("leaf");
}
TruffleInlining decisions = builder.buildDecisions();
Assert.assertEquals(width, countInlines(decisions, "leaf"));
}
use of org.graalvm.compiler.truffle.runtime.TruffleInlining in project graal by oracle.
the class BasicTruffleInliningTest method testDontInlineIntoBigFunctions.
@Test
public void testDontInlineIntoBigFunctions() {
// @formatter:off
TruffleInlining decisions = builder.target("callee").target("caller", TruffleCompilerOptions.getValue(TruffleInliningMaxCallerSize)).calls("callee").buildDecisions();
// @formatter:on
assertNotInlined(decisions, "callee");
}
Aggregations