Stream: cranelift

Topic: ✔ Question about isle "rule" keyword


view this post on Zulip Jun Ryung Ju (Oct 10 2022 at 00:10):

I have question on isle rule grammar.
what is exactly number right after rule keyword?

because I don't see any explaination about this on cranelift_isle readme.

for example.

(rule 2 (lower (has_type $B1 (icmp (IntCC.SignedGreaterThanOrEqual) x @ (value_type $I64) (u64_from_iconst 0))))
      (x64_shr $I64 (x64_not $I64 x) (Imm8Reg.Imm8 63)))

what does rule "2" means?

view this post on Zulip bjorn3 (Oct 10 2022 at 09:18):

I believe it is the priority of the rule.

view this post on Zulip Jun Ryung Ju (Oct 10 2022 at 09:43):

oh so higher number means higher priority?

view this post on Zulip Afonso Bordado (Oct 10 2022 at 09:47):

Yes, exactly that! Although we don't have this in our docs it is described a with a bit more detail in the original design document for ISLE (with a slightly different syntax), we should probably point to it in our readme.

RFC process for Bytecode Alliance projects. Contribute to bytecodealliance/rfcs development by creating an account on GitHub.

view this post on Zulip Jun Ryung Ju (Oct 10 2022 at 09:54):

Thank you for help :)

view this post on Zulip Notification Bot (Oct 10 2022 at 09:54):

Jun Ryung Ju has marked this topic as resolved.


Last updated: Dec 23 2024 at 12:05 UTC