[英]Does Rebar3 compile Dialyzer modules with HiPE?
当单独运行 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 dialyzer
吗? 文档并没有以一种或另一种方式说明。
正如 Dogbert 在评论中提到的,rebar3 中的默认值是使用源格式。 原生版本有一个挂起的拉取请求 ( https://github.com/erlang/rebar3/pull/1493 ) 以在可用时切换到 HiPE 格式,但在 rebar3 的上下文中,非原生版本的基准测试速度更快,到目前为止,我们还没有合并它。
我刚刚更新了那里的 PR 讨论,以查看即使默认情况下未启用它是否也无法包含在内。
稍后再回到这一点,从 Erlang/OTP 22.0.6 开始,HiPE 编译功能已从 Dialyzer 中删除,因此 Rebar3 无法激活该功能。 从发布公告:
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.
此外,根据这个邮件列表线程,HiPE 将在 Erlang/OTP 24 中完全删除。这是在这个 pull request 中完成的。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.