Available_regs, Reg_with_debug_info, Reg_availability_set etc. #8614
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.
This patch allows
Available_regs
to track which registers hold which constants in addition to the values of which variables. New implementations are also provided ofReg_with_debug_info
andReg_availability_set
. These two should be read by just looking at the files rather than the diffs.This whole area, especially the notions of canonical and non-canonical register availability sets, is rather subtle. I think this new version of the code is a substantial improvement and it should be more obviously correct.
Some changes have been necessitated to
Compute_ranges
as a union operation is not provided on canonical availability sets. Concerned about the correctness of this part, I wrote a specification of a proof in a PDF document and @gretay-js has done the proof in z3.I've tested all of this on the main
gdb-names-gpr
branch and everything appears to be ok. It would be nice in the future to try to add some more automated testing in this area (e.g. to make sure that all variables that should be visible in the debugger are visible)---although it's probably difficult.@lthls @chambart Please could you two look at the various pieces of this, as you were the original reviewers of these files.