Rebar3 是否使用 HiPE 编译 Dialyzer 模块?
Does Rebar3 compile Dialyzer modules with HiPE?
当运行ning Dialyzer单机时,为了加快分析速度,使用HiPE编译其模块:
dialyzer --src -r .
Checking whether the PLT /home/foo/.dialyzer_plt is up-to-date... yes
Compiling some key modules to native code... done in 0m12.27s
Proceeding with analysis...
当有很多模块要分析时,这会对 运行 时间产生很大的影响。
当您 运行 rebar3 dialyzer
命令时,Rebar3 会这样做吗? documentation 并没有说明任何一种方式。
正如Dogbert 在评论中提到的,rebar3 中默认使用源格式。原生版本有一个待处理的拉取请求 (https://github.com/erlang/rebar3/pull/1493) 可以在可用时切换到 HiPE 格式,但在 rebar3 的上下文中,非原生版本的基准测试速度更快,到目前为止我们还没有合并它。
我刚刚更新了那里的 PR 讨论,看看它是否不能包括在内,即使默认情况下没有启用。
稍后再谈这个问题,从 Erlang/OTP 22.0.6 开始,HiPE 编译功能已从 Dialyzer 中删除,因此 Rebar3 无法激活该功能。来自 the release announcement:
OTP-15949 Application(s): dialyzer, hipe
*** POTENTIAL INCOMPATIBILITY ***
The HiPE compiler would badly miscompile certain
try/catch expressions, so it will now refuse to compile
modules containing try or catch.
As a consequence of this, dialyzer will no longer
compile key modules to native code.
此外,根据 this mailing list thread, HiPE will be removed entirely in Erlang/OTP 24. It was done in this pull request。
当运行ning Dialyzer单机时,为了加快分析速度,使用HiPE编译其模块:
dialyzer --src -r .
Checking whether the PLT /home/foo/.dialyzer_plt is up-to-date... yes
Compiling some key modules to native code... done in 0m12.27s
Proceeding with analysis...
当有很多模块要分析时,这会对 运行 时间产生很大的影响。
当您 运行 rebar3 dialyzer
命令时,Rebar3 会这样做吗? documentation 并没有说明任何一种方式。
正如Dogbert 在评论中提到的,rebar3 中默认使用源格式。原生版本有一个待处理的拉取请求 (https://github.com/erlang/rebar3/pull/1493) 可以在可用时切换到 HiPE 格式,但在 rebar3 的上下文中,非原生版本的基准测试速度更快,到目前为止我们还没有合并它。
我刚刚更新了那里的 PR 讨论,看看它是否不能包括在内,即使默认情况下没有启用。
稍后再谈这个问题,从 Erlang/OTP 22.0.6 开始,HiPE 编译功能已从 Dialyzer 中删除,因此 Rebar3 无法激活该功能。来自 the release announcement:
OTP-15949 Application(s): dialyzer, hipe
*** POTENTIAL INCOMPATIBILITY ***
The HiPE compiler would badly miscompile certain
try/catch expressions, so it will now refuse to compile
modules containing try or catch.
As a consequence of this, dialyzer will no longer
compile key modules to native code.
此外,根据 this mailing list thread, HiPE will be removed entirely in Erlang/OTP 24. It was done in this pull request。