[llvm-dev] Where is the time going? - update

Vedant Kumar via llvm-dev llvm-dev at lists.llvm.org
Wed Mar 9 15:01:43 PST 2016


> On Mar 9, 2016, at 12:09 PM, David Jones via llvm-dev <llvm-dev at lists.llvm.org> wrote:
> 
> Further to my previous email, I now have some answers.  The culprit is the IR verifier.
> 
> 1. opt -time-passes does not report time spent in the IR verifier.
> 
> If I add -disable-verify, opt's run time drops from 71 seconds to 37 seconds.
> 
> 2. -disable-verify doesn't disable all verification runs.
> 
> The IR verifier is run 3 times: once prior to any optimization work, once between running the module passes and running the function passes, and finally at the end of all optimization prior to writing out optimized IR.
> 
> -disable-verify knocks out the first and last invocations of the verifier, but leaves the middle invocation in.

Could you point us to this middle invocation?

It really does seem like we should check for -disable-verify before
any calls to llvm::verifyModule and friends.

vedant


> You can see this by throwing -debug-pass=Executions and running in a debugger. There is a noticeable pause between running the module and function passes. If you backtrace during this pause, you will see that you are in the verifier.
> 
> If I account for time spent in the middle invocation of the verifier, the non-verifier run time agrees with the output of -time-passes.
> 
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev



More information about the llvm-dev mailing list