Skip to content

ISLE: move icmp rewrites to separate file.#6120

Merged
cfallin merged 5 commits into
bytecodealliance:mainfrom
Kmeakin:icmp-rewrites-separate-file
Mar 31, 2023
Merged

ISLE: move icmp rewrites to separate file.#6120
cfallin merged 5 commits into
bytecodealliance:mainfrom
Kmeakin:icmp-rewrites-separate-file

Conversation

@Kmeakin
Copy link
Copy Markdown
Contributor

@Kmeakin Kmeakin commented Mar 29, 2023

Move icmp-related rewrite rules from algebraic.isle to icmp.isle.
Also move icmp-related tests from algebraic.clif to icmp.clif.

Move `icmp`-related rewrite rules from `algebraic.isle` to `icmp.isle`.
Also move `icmp`-related tests from `algebraic.clif` to `icmp.clif`.
@Kmeakin Kmeakin requested a review from a team as a code owner March 29, 2023 23:48
@Kmeakin Kmeakin requested review from elliottt and removed request for a team March 29, 2023 23:48
@cfallin
Copy link
Copy Markdown
Member

cfallin commented Mar 29, 2023

Taking a look!

Comment thread cranelift/codegen/src/opts/icmp.isle Outdated
Comment thread cranelift/filetests/filetests/egraph/make-icmp-tests.sh Outdated
@Kmeakin Kmeakin requested review from cfallin and jameysharp and removed request for elliottt and jameysharp March 30, 2023 00:45
@github-actions github-actions Bot added the cranelift Issues related to the Cranelift code generator label Mar 30, 2023
@cfallin
Copy link
Copy Markdown
Member

cfallin commented Mar 30, 2023

@Kmeakin it looks like this is still not quite a verbatim move, which is making it tricky for me to verify -- e.g., this rule

;; Optimize icmp-of-icmp.
(rule (simplify (ne ty
                      (uextend _ inner @ (icmp ty _ _ _))
                      (iconst _ (u64_from_imm64 0))))
      (subsume inner))

became

;; Optimize icmp-of-icmp:
(rule (simplify (ne ty (uextend _ inner @ (icmp ty _ _ _)) (iconst _ (u64_from_imm64 0))))
      (subsume inner))

I'm trying not to be too picky but I also find it much easier if code motion isn't mixed in with re-formatting, change of comments, etc.; if you don't mind, would you be able to redo the code-motion with a straight copy-paste, keeping things in the same order, then we can do other refactors later?

Copy link
Copy Markdown
Member

@cfallin cfallin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@cfallin cfallin added this pull request to the merge queue Mar 31, 2023
Merged via the queue into bytecodealliance:main with commit c8c224e Mar 31, 2023
@Kmeakin Kmeakin deleted the icmp-rewrites-separate-file branch January 30, 2024 00:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cranelift Issues related to the Cranelift code generator

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants