简体   繁体   中英

Does Rebar3 compile Dialyzer modules with HiPE?

When running Dialyzer stand-alone, it compiles its modules with HiPE, in order to speed up the analysis:

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...

This can make a big difference to run time when there are many modules to be analysed.

Does Rebar3 do that when you run the rebar3 dialyzer command? The documentation doesn't say one way or another.

As mentioned by Dogbert in a comment, the default in rebar3 is to use the source format. The native one has a pending pull request ( https://github.com/erlang/rebar3/pull/1493 ) to switch to the HiPE format when available, but in the context of rebar3, the non-native version benchmarked as faster and so far we haven't merged it in.

I've just updated the PR discussion in there to see if it couldn't be included even if not enabled by default.

Coming back to this much later, as of Erlang/OTP 22.0.6 the HiPE compilation feature has been removed from Dialyzer, and consequently there is no way for Rebar3 to activate that feature. From 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.

Also, as per this mailing list thread , HiPE will be removed entirely in Erlang/OTP 24. It was done in this pull request .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM