aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorAnthony Ramine <[email protected]>2014-02-07 16:59:06 +0100
committerAnthony Ramine <[email protected]>2014-02-07 16:59:06 +0100
commitf8723a8fe3cba291df7e087619bf4f8ee502ce52 (patch)
tree996e42171b8e2762dd08935833788bc6b24149d5 /lib
parent8d71ab498974b5f0623eac50c4f94f62fc229a94 (diff)
downloadotp-f8723a8fe3cba291df7e087619bf4f8ee502ce52.tar.gz
otp-f8723a8fe3cba291df7e087619bf4f8ee502ce52.tar.bz2
otp-f8723a8fe3cba291df7e087619bf4f8ee502ce52.zip
Run sys_core_fold twice if any inliner is used
Diffstat (limited to 'lib')
-rw-r--r--lib/compiler/src/compile.erl6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/compiler/src/compile.erl b/lib/compiler/src/compile.erl
index 0bb4de6f17..fd046d6cac 100644
--- a/lib/compiler/src/compile.erl
+++ b/lib/compiler/src/compile.erl
@@ -625,7 +625,8 @@ core_passes() ->
?pass(core_fold_module),
{core_inline_module,fun test_core_inliner/1,fun core_inline_module/1},
{iff,dinline,{listing,"inline"}},
- {core_fold_after_inlining,fun test_core_inliner/1,fun core_fold_module_after_inlining/1},
+ {core_fold_after_inlining,fun test_any_inliner/1,
+ fun core_fold_module_after_inlining/1},
?pass(core_transforms)]},
{iff,dcopt,{listing,"copt"}},
{iff,'to_core',{done,"core"}}]}
@@ -1171,6 +1172,9 @@ test_core_inliner(#compile{options=Opts}) ->
end, Opts)
end.
+test_any_inliner(St) ->
+ test_old_inliner(St) orelse test_core_inliner(St).
+
core_old_inliner(#compile{code=Code0,options=Opts}=St) ->
{ok,Code} = sys_core_inline:module(Code0, Opts),
{ok,St#compile{code=Code}}.