Replies: 2 comments 1 reply
-
You may be interested in (and maybe have already seen!) this paper: https://ztatlock.net/pubs/2009-popl-equality-saturation-optimizations-egraphs.pdf. |
Beta Was this translation helpful? Give feedback.
-
This paper looks very interesting. I was aware of similar effort in halide and cranelift where they seek to express, combine and execute rewrite rules effectively. The referenced paper seems to require the translation to their IR, thus I assume egg might not be an obvious/ easy choice for this type of application? The egg paper references Denali but notes that "it was intended to be used on Coming from the Denali paper it seems to me egg+z3/cvc4 (as an example) should be able to fulfil my goal but I'm not yet sure how exactly :D I may reframe my question such that I'm wondering if e-graphs can be used to express the flow of execution of a simple assembly program such as one written in EIR, and whether or not the expressiveness of the rewrite rules is appropriate for defining rewrites such as dead code elimination/ redundant load/ store removal. |
Beta Was this translation helpful? Give feedback.
-
Looking at elvm I was wondering if egg could be used to implement dead code elimination/ redundant store/ load optimisation on its IR (eir). Eir s basically a very restricted set of assembly instructions and adopting egg for eir could prove its feasibility for real world instruction sets as well.
For ELVM specifically it could maybe help reduce code size a bit as it currently lacks any optimisations and there might thus be much low hanging fruit.
Egg could also easily be compared to existing c compilers performance (although one would not expect a real competitive setting here of course).
Specific questions are probably around jmp and side effects, relevant disucssions here seem to be #145 and #106
Any pointers are appreciated :)
Beta Was this translation helpful? Give feedback.
All reactions