eclipse-omr / omr

Eclipse OMR™ Cross platform components for building reliable, high performance language runtimes
http://www.eclipse.org/omr
Other
946 stars 396 forks source link

Generalize widened and simplification in value propagation #396

Open fjeremic opened 8 years ago

fjeremic commented 8 years ago

Referencing the comment by @vijaysun-omr in https://github.com/eclipse/omr/pull/381#issuecomment-256696340 this issue is to track the work to implement the widened and simplification using value constraints determined during the value propagation optimization pass.

keithc-ca commented 8 years ago

Are constants always expected on the right-hand side? If not, this optimization could equally apply if the child nodes are reversed ('and' is symmetric).

vijaysun-omr commented 8 years ago

One of the "tree canonicalizations" done by simplifier is to reorder expressions such that the constant is the second child (i.e. the right hand side) where possible to allow other opts to assume that and make their implementation simpler.

keithc-ca commented 8 years ago

That makes sense. Thanks for the education and tolerating a query from a newb. ;-)

fjeremic commented 8 years ago

@keithc-ca Just in case you're curious the said ordering can be seen a few lines before the call to my new helper function here:

https://github.com/eclipse/omr/blob/master/compiler/optimizer/OMRSimplifierHandlers.cpp#L11114

vijaysun-omr commented 8 years ago

Just thought I would also mention that there is some documentation on our IL at

https://github.com/eclipse/omr/tree/master/doc/compiler/il

in case you are interested to learn more about it in general.