CFG: Add validator for register allocation.#786
Conversation
|
(I need to give it a proper look, but the failure might |
Merging that fixed the test failure. |
xclerc
left a comment
There was a problem hiding this comment.
I have made a first, rather superficial, pass
over everything but the tests. Most, if not
all, comments are minor.
gretay-js
left a comment
There was a problem hiding this comment.
I read almost the entire PR, it's looks great! I haven't read the printing code and I need to make another pass on the transfer functions.
My main comment is the representation of abstact values in the Domain and the fact the Domain has bits of transfer functions. My view is the domain should be just a set of equations.
The calling convention of Ocaml has a constraint on arguments that are passed in Domainstate.extra_params: they need to be spilled immediately on entry, before any GC or context switch. Is this checked?
It would be nice to make a subdirectory for the validator and split cfg_regalloc_validate.ml into separate files, when structural checks are added.
xclerc
left a comment
There was a problem hiding this comment.
The comments are really useful; comments/suggestion are about typos.
gretay-js
left a comment
There was a problem hiding this comment.
I haven't reviewed the test and the printing code. The rest is ready to be merged.
xclerc
left a comment
There was a problem hiding this comment.
(Did not read the refactoring of dataflow.)
mshinwell
left a comment
There was a problem hiding this comment.
Approval only for files owned by me
(without structural checks)
Added validator and unit test for misallocations.
The validator currently has naive implementation in terms of complexity.
It has PR's #774 and #804 included because without them testsuite fails (as validator detects those problems).