diff options
author | Björn Gustavsson <[email protected]> | 2014-02-13 11:44:39 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2014-02-13 11:44:39 +0100 |
commit | 0f5547c39ae8679a4395c90c8d7cc7465b3e63f3 (patch) | |
tree | 2d0794afecc24720cbacf9a21a320eb6733a2893 /lib/compiler/src/compile.erl | |
parent | a1f8870a3fbd9f1902d22450bd00d83bf686dc20 (diff) | |
parent | 85cc321c5d3d1e78a895a549a856266228a75a02 (diff) | |
download | otp-0f5547c39ae8679a4395c90c8d7cc7465b3e63f3.tar.gz otp-0f5547c39ae8679a4395c90c8d7cc7465b3e63f3.tar.bz2 otp-0f5547c39ae8679a4395c90c8d7cc7465b3e63f3.zip |
Merge branch 'nox/compiler/v3_core-case-arg-opt'
* nox/compiler/v3_core-case-arg-opt:
Optimise case arguments in sys_core_fold
Run sys_core_fold twice if any inliner is used
Diffstat (limited to 'lib/compiler/src/compile.erl')
-rw-r--r-- | lib/compiler/src/compile.erl | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/compiler/src/compile.erl b/lib/compiler/src/compile.erl index 5588f1fbe5..e79fe41f9b 100644 --- a/lib/compiler/src/compile.erl +++ b/lib/compiler/src/compile.erl @@ -626,7 +626,8 @@ core_passes() -> {iff,dcorefold,{listing,"corefold"}}, {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"}}]} @@ -1172,6 +1173,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}}. |