Repository navigation
jitv2: let IRIS_JIT_VERIFY turn the IR verifier back on - #381
Closed
jamesbraid wants to merge 3 commits into
Closed
jamesbraid wants to merge 3 commits into
jamesbraid wants to merge 3 commits into
Conversation
The verifier is off outside unit tests and developer builds, so invalid IR from a codegen bug becomes a miscompile or a crash at run time rather than a panic at compile time. Setting IRIS_JIT_VERIFY=1 (or "on") runs it in any build, which lets someone holding a crash report get the clean panic without rebuilding. Same values and caching as IRIS_JIT_CACHE. The doc comment and CHANGELOG now say where it is on: a Cargo profile named developer does not enable features, and integration tests and bins such as jitv2-verify run unverified unless the variable is set.
The test compared the two builds on one page of word loads and stores. The IR for narrow and 64-bit memory ops, FP ops, branch-likely, forward and backward branches and jumps comes from different codegen paths, so a flag that changed any of them would have gone unnoticed. Compile one page of each and compare the machine code.
The entry gave x86 timings that appear nowhere else; the pull request reports Fuel's boot to the login prompt in the loop and fast profiles. Use those so the two agree.
Contributor
|
cool. |
Contributor
Author
|
Folded into #379. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#377 turned Cranelift's IR verifier off outside unit tests and
--features developerbuilds. A codegen bug in a release build then shows up as a miscompile or crash at run time instead of a verifier panic at compile time.IRIS_JIT_VERIFY=1(oron) turns the verifier back on in any build, so a crash can be checked without rebuilding.Also:
verifier_off_emits_the_same_codenow compares verifier-on and verifier-off machine code for five page shapes instead of one: loads and stores of each width, FP, branch-likely, and a multi-block page with forward and backward branches.developerdoesn't enable the feature, and integration tests and bins such asjitv2-verifyrun unverified unless the variable is set.Tested with
cargo test --release --features jitv2 --liband nextest (2388 passed), andcargo check --release --bins --testswith and withoutjitv2. Nothing tests the environment variable itself, because unit tests always run the verifier.