Open rbanerjee opened 6 years ago
Does this assume that simplifier will be a mandatory optimization pass on all optimization levels? IIRC simplifier is the pass which canonicalizes such IL, among other things.
@fjeremic For the time being that's correct. Simplifier is already implicitly mandatory because existing evaluators will misbehave when given "un-canonicalized" IL (and I'm quite sure the different code generators are not consistent about this either).
Ideally, we should have a better definition of "canonicalized" IL, other than just "whatever the output of simplifier is". These new validation rules will hopefully help us get there. 🙂
Does this assume that simplifier will be a mandatory optimization pass on all optimization levels?
@fjeremic Sorry it took me so long to circle back to this. @Leonardo2718 is correct. There's also this Issue #2161, which is partly related to identifying which Optimizations should even be part of the "mandatory optimization pass".
As @vijaysun-omr pointed out here, one of the implicit expectations that our IL currently makes is:
With the ILValidator now in place (via https://github.com/eclipse/omr/pull/1826), this implicit expectation should be made into an IL Validation rule.
The process would involve implementing the steps outlined below:
[ ] Create a
TR::NodeValidation
Rule that checks the child layout for Binary OpCodes against the said expectation[ ] Make this
ILValidationRule
a part the "appropriate"ILValidationStrategy
array. [This would require investigating where exactly in the Compilation phase does this Rule get satisfied, I.e,right after ILGen
,immediately before going into codegen
etc.][ ] Add the associated
Tril
ILValidatorTest
s