Mercurial > hg > graal-compiler
changeset 18816:972009398b30
Disable inlining across Truffle boundary by default.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Sun, 11 Jan 2015 02:39:07 +0100 |
parents | c4469ca2a822 |
children | b51cfbc2bd07 |
files | CHANGELOG.md graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/TruffleCompilerImpl.java graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/TruffleCompilerOptions.java |
diffstat | 3 files changed, 12 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/CHANGELOG.md Sun Jan 11 00:00:37 2015 +0100 +++ b/CHANGELOG.md Sun Jan 11 02:39:07 2015 +0100 @@ -9,6 +9,7 @@ ### Truffle * Added Node#deepCopy as primary method to copy ASTs. +* Disable inlining across Truffle boundary by default. New option TruffleInlineAcrossTruffleBoundary default false. ### Truffle-DSL * All methods enclosed in a @TypeSystem must now be static.
--- a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/TruffleCompilerImpl.java Sun Jan 11 00:00:37 2015 +0100 +++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/TruffleCompilerImpl.java Sun Jan 11 02:39:07 2015 +0100 @@ -40,6 +40,7 @@ import com.oracle.graal.java.*; import com.oracle.graal.lir.asm.*; import com.oracle.graal.nodes.*; +import com.oracle.graal.nodes.java.*; import com.oracle.graal.nodes.spi.*; import com.oracle.graal.phases.*; import com.oracle.graal.phases.tiers.*; @@ -123,6 +124,13 @@ return; } + if (!TruffleCompilerOptions.TruffleInlineAcrossTruffleBoundary.getValue()) { + // Do not inline across Truffle boundaries. + for (MethodCallTargetNode mct : graph.getNodes(MethodCallTargetNode.class)) { + mct.invoke().setUseForInlining(false); + } + } + compilationNotify.notifyCompilationTruffleTierFinished(compilable, graph); CompilationResult compilationResult = compileMethodHelper(graph, assumptions, compilable.toString(), compilable.getSpeculationLog(), compilable); compilationNotify.notifyCompilationSuccess(compilable, graph, compilationResult);
--- a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/TruffleCompilerOptions.java Sun Jan 11 00:00:37 2015 +0100 +++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/TruffleCompilerOptions.java Sun Jan 11 02:39:07 2015 +0100 @@ -101,6 +101,9 @@ @Option(help = "Enable asynchronous truffle compilation in background thread", type = OptionType.Expert) public static final OptionValue<Boolean> TruffleBackgroundCompilation = new OptionValue<>(true); + @Option(help = "Enable inlining across Truffle boundary", type = OptionType.Expert) + public static final OptionValue<Boolean> TruffleInlineAcrossTruffleBoundary = new OptionValue<>(false); + @Option(help = "", type = OptionType.Debug) public static final OptionValue<Integer> TruffleCompilationDecisionTime = new OptionValue<>(100);