Mercurial > hg > graal-compiler
annotate graal/com.oracle.graal.truffle.test/sl/TestInliningMaxCallerSize.sl @ 21646:645f170013a4
Fix in the scheduler for proxy node handling.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Mon, 01 Jun 2015 22:14:34 +0200 |
parents | bb7e95512781 |
children |
rev | line source |
---|---|
17007
004e3f0a0517
Truffle: added new infrastructure for graal truffle runtime tests using SL.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
1 /* |
004e3f0a0517
Truffle: added new infrastructure for graal truffle runtime tests using SL.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
2 * This test verifies that CallTargets cannot exceed the TruffleInliningMaxCallerSize limit when inlining. |
004e3f0a0517
Truffle: added new infrastructure for graal truffle runtime tests using SL.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
3 */ |
004e3f0a0517
Truffle: added new infrastructure for graal truffle runtime tests using SL.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
4 function inlinableFunction() { |
20959
bb7e95512781
SL: fix calls produce less nodes now.
Christian Humer <christian.humer@gmail.com>
parents:
17405
diff
changeset
|
5 generateDummyNodes(getOption("TruffleInliningMaxCallerSize") - 7); |
17007
004e3f0a0517
Truffle: added new infrastructure for graal truffle runtime tests using SL.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
6 } |
004e3f0a0517
Truffle: added new infrastructure for graal truffle runtime tests using SL.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
7 |
004e3f0a0517
Truffle: added new infrastructure for graal truffle runtime tests using SL.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
8 function notInlinableFunction() { |
20959
bb7e95512781
SL: fix calls produce less nodes now.
Christian Humer <christian.humer@gmail.com>
parents:
17405
diff
changeset
|
9 generateDummyNodes(getOption("TruffleInliningMaxCallerSize") - 6); |
17007
004e3f0a0517
Truffle: added new infrastructure for graal truffle runtime tests using SL.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
10 } |
004e3f0a0517
Truffle: added new infrastructure for graal truffle runtime tests using SL.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
11 |
004e3f0a0517
Truffle: added new infrastructure for graal truffle runtime tests using SL.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
12 function test1() { |
004e3f0a0517
Truffle: added new infrastructure for graal truffle runtime tests using SL.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
13 inlinableFunction(); |
004e3f0a0517
Truffle: added new infrastructure for graal truffle runtime tests using SL.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
14 } |
004e3f0a0517
Truffle: added new infrastructure for graal truffle runtime tests using SL.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
15 |
004e3f0a0517
Truffle: added new infrastructure for graal truffle runtime tests using SL.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
16 function test2() { |
004e3f0a0517
Truffle: added new infrastructure for graal truffle runtime tests using SL.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
17 notInlinableFunction(); |
004e3f0a0517
Truffle: added new infrastructure for graal truffle runtime tests using SL.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
18 } |
004e3f0a0517
Truffle: added new infrastructure for graal truffle runtime tests using SL.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
19 |
004e3f0a0517
Truffle: added new infrastructure for graal truffle runtime tests using SL.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
20 function main() { |
17370
5c06895b1aec
sl inlining test: override default setting for max caller size to a smaller value
Bernhard Urban <bernhard.urban@jku.at>
parents:
17257
diff
changeset
|
21 originalMaxCallerSize = getOption("TruffleInliningMaxCallerSize"); |
5c06895b1aec
sl inlining test: override default setting for max caller size to a smaller value
Bernhard Urban <bernhard.urban@jku.at>
parents:
17257
diff
changeset
|
22 setOption("TruffleInliningMaxCallerSize", 20); |
17405
04d6bb76cfb3
Truffle: update callUntilOptimized to wait for the compilation and call it once optimized.
Christian Humer <christian.humer@gmail.com>
parents:
17399
diff
changeset
|
23 callUntilOptimized(test1); |
17257
f735aa886cf6
Truffle: add new inlining tests; adapt tests for context sensitive inlining.
Christian Humer <christian.humer@gmail.com>
parents:
17007
diff
changeset
|
24 assertTrue(isInlined(test1, test1, inlinableFunction), "inlinableFunction is not inlined"); |
17007
004e3f0a0517
Truffle: added new infrastructure for graal truffle runtime tests using SL.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
25 |
17405
04d6bb76cfb3
Truffle: update callUntilOptimized to wait for the compilation and call it once optimized.
Christian Humer <christian.humer@gmail.com>
parents:
17399
diff
changeset
|
26 callUntilOptimized(test2); |
17399
5787218bad91
Truffle: implemented recursive node iterator and node streams for the graal runtime.
Christian Humer <christian.humer@gmail.com>
parents:
17370
diff
changeset
|
27 assertFalse(isInlined(test2, test2, notInlinableFunction), "notInlinableFunction is inlined"); |
17370
5c06895b1aec
sl inlining test: override default setting for max caller size to a smaller value
Bernhard Urban <bernhard.urban@jku.at>
parents:
17257
diff
changeset
|
28 setOption("TruffleInliningMaxCallerSize", originalMaxCallerSize); |
17007
004e3f0a0517
Truffle: added new infrastructure for graal truffle runtime tests using SL.
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
29 } |