Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use meta for IR instruction pattern matching #1137

Closed
bnjbvr opened this issue Oct 11, 2019 · 6 comments
Closed

Use meta for IR instruction pattern matching #1137

bnjbvr opened this issue Oct 11, 2019 · 6 comments
Labels
cranelift:discussion cranelift:meta Everything related to the meta-language. cranelift Issues related to the Cranelift code generator

Comments

@bnjbvr
Copy link
Member

bnjbvr commented Oct 11, 2019

The meta language is powerful enough to handle the problem of transforming one instruction into a sequence of other instructions using simple declarations. It could also solve the reverse problem of pattern-matching several instructions into one, which could help implementing instruction selection / pipehole optimizations using meta declarations.

@fitzgen
Copy link
Member

fitzgen commented Oct 11, 2019

Also easy for a superoptimizer to generate such patterns ;)

@bjorn3
Copy link
Contributor

bjorn3 commented Oct 11, 2019

^ https://github.com/jubitaneja/codegen

Havent tried it yet, so I dont know what the status is. (cc @jubitaneja)

@alexcrichton alexcrichton transferred this issue from bytecodealliance/cranelift Feb 28, 2020
@alexcrichton alexcrichton added cranelift:discussion cranelift:meta Everything related to the meta-language. cranelift Issues related to the Cranelift code generator labels Feb 28, 2020
@bjorn3
Copy link
Contributor

bjorn3 commented Feb 3, 2021

We have peepmatic now, which is roughtly this, right?

@cfallin
Copy link
Member

cfallin commented Feb 3, 2021

Yes, though there are open questions around how to integrate it or use a Peepmatic-like scheme for instruction lowering in the new backends, so I think we should leave this open to track.

@akirilov-arm
Copy link
Contributor

And I guess we are now discussing this in bytecodealliance/rfcs#15?

@bnjbvr
Copy link
Member Author

bnjbvr commented Sep 13, 2021

Yep.

@bnjbvr bnjbvr closed this as completed Sep 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cranelift:discussion cranelift:meta Everything related to the meta-language. cranelift Issues related to the Cranelift code generator
Projects
None yet
Development

No branches or pull requests

6 participants