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?
I believe it is the priority of the rule.
oh so higher number means higher priority?
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.
Thank you for help :)
Jun Ryung Ju has marked this topic as resolved.
Last updated: Nov 22 2024 at 16:03 UTC