Mercurial > hg > graal-compiler
view graal/com.oracle.graal.truffle.test/sl/TestInliningMaxCallerSize.sl @ 17065:37d6d174bc40
denote certain applications of DeadCodeEliminationPhase as optional and only run them if -G:-ReduceDCE
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Mon, 08 Sep 2014 21:23:18 +0200 |
parents | 004e3f0a0517 |
children | f735aa886cf6 |
line wrap: on
line source
/* * This test verifies that CallTargets cannot exceed the TruffleInliningMaxCallerSize limit when inlining. */ function inlinableFunction() { generateDummyNodes(getOption("TruffleInliningMaxCallerSize") - 8); } function notInlinableFunction() { generateDummyNodes(getOption("TruffleInliningMaxCallerSize") - 7); } function test1() { inlinableFunction(); } function test2() { notInlinableFunction(); } function main() { waitForOptimization(callUntilOptimized(test1)); assertTrue(isInlined(test1, inlinableFunction), "inlinableFunction is not inlined"); waitForOptimization(callUntilOptimized(test2)); assertFalse(isInlined(test2, notInlinableFunction), "notInlinableFunction is inlined"); }