Stream: cranelift

Topic: ISLE peepmatic


view this post on Zulip Sam Parker (Apr 28 2022 at 14:35):

Hi @fitzgen (he/him)
Sorry if this is a silly question, as I didn't look at the peepmatic files before ISLE landed, but I take it that peepmatic hasn't been ported to ISLE? The syntax looks similar enough, but judging by the file extension, it's not ISLE.

view this post on Zulip fitzgen (he/him) (Apr 28 2022 at 16:09):

peepmatic is similar to ISLE in that it is s-expressions and based on term rewriting, but the implementation was fairly different and it wasn't really a full fledged language the way that ISLE is.

also, peepmatic was clif to clif, so porting the preopt-in-peepmatic stuff would require building the ISLE infrastructure to go clif to clif instead of clif to mach inst. this is something @Chris Fallin and I have been talking about as part of the mid end work that is coming up. we want to be able to not just port peepholes over to ISLE but also use ISLE for data flow analyses and transformations based on them (sort of similar to hoopl: https://www.microsoft.com/en-us/research/wp-content/uploads/2016/07/hoopl-haskell10.pdf)

lots of details to still figure out here and most likely eventually an RFC too

view this post on Zulip Chris Fallin (Apr 28 2022 at 17:04):

Yep, the goal is to be able to translate all of the peephole patterns, and potentially reuse a lot of the infra that Nick built to harvest patterns and get their rewrites from dedicated offline tools (e.g. Souper), in the long run

view this post on Zulip Chris Fallin (Apr 28 2022 at 17:05):

(the cool thing about having all of this in one language with the backend lowering as well is that there is potential for fusion later; we can play with the runtime/compilation strategy underlying everything when it's all "just term-rewriting"; and this will integrate with the verification work going on as well)

view this post on Zulip Sam Parker (May 03 2022 at 09:40):

Okay, thanks, sounds good! I was asking because I was thinking about canonicalization before isel, and I'm assuming that peepmatic is/was the place to do it?

view this post on Zulip Chris Fallin (May 03 2022 at 16:01):

Yes, and the plan is to have something similar soon-ish with ISLE! I'm currently sketching out a bit more about what a CLIF-to-CLIF pass in ISLE would look like, as a means to write legalizations but also other optimizations


Last updated: Dec 23 2024 at 13:07 UTC