Skip to content

Consider not running the verifier in non-debug builds #3554

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
pcwalton opened this issue Sep 22, 2012 · 9 comments
Closed

Consider not running the verifier in non-debug builds #3554

pcwalton opened this issue Sep 22, 2012 · 9 comments
Labels
A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. I-compiletime Issue: Problems and improvements with respect to compile times.

Comments

@pcwalton
Copy link
Contributor

The LLVM verifier is the second slowest pass after LiveIRVariables (2.4%/2.085 s). It's unnecessary and rarely catches stuff that the assertions don't. We should only run it in debug rustc builds.

@metajack
Copy link
Contributor

no-verify is already a debugging option, so I assume the compiler just needs some simple logic to add this to the driver in non-debug builds.

@bblum
Copy link
Contributor

bblum commented Jul 13, 2013

Related #3615. Nominating production-ready.

@graydon
Copy link
Contributor

graydon commented Jul 18, 2013

just a bug, removing milestone/nomination.

@huonw
Copy link
Member

huonw commented Sep 23, 2013

Triage: I assume that the verifier is Module Verifier in the output of -Z time-llvm-passes? If so, then the current timings are:

no-opt

   ---User Time---   --System Time--   --User+System--   ---Wall Time---  --- Name ---
  17.7440 ( 56.5%)   1.7320 ( 53.7%)  19.4760 ( 56.2%)  19.4380 ( 56.1%)  X86 DAG->DAG Instruction Selection
   3.0160 (  9.6%)   0.3800 ( 11.8%)   3.3960 (  9.8%)   3.4440 (  9.9%)  X86 Assembly / Object Emitter
   1.8000 (  5.7%)   0.1880 (  5.8%)   1.9880 (  5.7%)   1.9859 (  5.7%)  Fast Register Allocator
   1.6320 (  5.2%)   0.1480 (  4.6%)   1.7800 (  5.1%)   1.7558 (  5.1%)  Inliner for always_inline functions
   1.3880 (  4.4%)   0.1560 (  4.8%)   1.5440 (  4.5%)   1.5803 (  4.6%)  Module Verifier
   ... 2 passes ...
   0.6320 (  2.0%)   0.0600 (  1.9%)   0.6920 (  2.0%)   0.6389 (  1.8%)  Module Verifier
   ...

86s for the entire rustc invocation.

-O

   ---User Time---   --System Time--   --User+System--   ---Wall Time---  --- Name ---
  32.9560 ( 21.3%)   3.5840 ( 31.7%)  36.5400 ( 22.0%)  36.4753 ( 21.9%)  X86 DAG->DAG Instruction Selection
  11.2080 (  7.2%)   0.5440 (  4.8%)  11.7520 (  7.1%)  11.6393 (  7.0%)  Function Integration/Inlining
  10.2760 (  6.6%)   0.5080 (  4.5%)  10.7840 (  6.5%)  10.9164 (  6.6%)  Global Value Numbering
   7.4720 (  4.8%)   0.2560 (  2.3%)   7.7280 (  4.7%)   7.7136 (  4.6%)  Combine redundant instructions
   ... 35 passes ...
   0.6880 (  0.4%)   0.0960 (  0.8%)   0.7840 (  0.5%)   0.8407 (  0.5%)  Module Verifier
   ... 6 passes ...
   0.5800 (  0.4%)   0.0720 (  0.6%)   0.6520 (  0.4%)   0.6933 (  0.4%)  Module Verifier
   ... 6 passes ...
   0.5720 (  0.4%)   0.0400 (  0.4%)   0.6120 (  0.4%)   0.5771 (  0.3%)  Module Verifier
   ...

245s for the entire invocation.

@ahmedcharles
Copy link
Contributor

Is this still relevant?

@thestinger
Copy link
Contributor

Yes, it's still relevant. I think we do want to keep running this for now though.

@steveklabnik
Copy link
Member

Triage:

-Z time-llvm-passes 2>&1 | grep "Module Verifier"

   0.1400 (  9.3%)   0.0360 ( 12.5%)   0.1760 (  9.8%)   0.1131 (  6.5%)  Module Verifier
   0.0640 (  4.2%)   0.0120 (  4.2%)   0.0760 (  4.2%)   0.0726 (  4.2%)  Module Verifier
   0.0680 (  4.5%)   0.0040 (  1.4%)   0.0720 (  4.0%)   0.0712 (  4.1%)  Module Verifier

-O -Z time-llvm-passes 2>&1| grep "Module Verifier"

   0.1240 (  1.1%)   0.0040 (  1.4%)   0.1280 (  1.2%)   0.1158 (  1.0%)  Module Verifier
   0.0560 (  0.5%)   0.0000 (  0.0%)   0.0560 (  0.5%)   0.0609 (  0.5%)  Module Verifier
   0.0440 (  0.4%)   0.0000 (  0.0%)   0.0440 (  0.4%)   0.0499 (  0.4%)  Module Verifier

tested with wtftw, takes 17s total on my machine

@brson
Copy link
Contributor

brson commented Jun 10, 2016

It's a small improvement. Still doesn't seem worth turning it off to me. Are we ever going to want to turn off the LLVM module verifier? Can we close this issue?

cc @rust-lang/compiler

@brson brson closed this as completed Jun 28, 2016
@brson
Copy link
Contributor

brson commented Jun 28, 2016

You snooze you lose!

RalfJung pushed a commit to RalfJung/rust that referenced this issue May 4, 2024
document unofficially supported OSes

Also tweak the freeBSD testing a bit.
RalfJung pushed a commit to RalfJung/rust that referenced this issue May 4, 2024
document unofficially supported OSes

Also tweak the freeBSD testing a bit.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. I-compiletime Issue: Problems and improvements with respect to compile times.
Projects
None yet
Development

No branches or pull requests

9 participants