Skip to content

Conversation

ValKmjolnir
Copy link
Collaborator

@ValKmjolnir ValKmjolnir commented Feb 10, 2025

inst combine pass will iterate multiple times to make sure necessary combinations are done.

for example:

(
  GF_4A_id(ssa_temp_2, a),
  ssa_temp_2 != 1,
  R_1A7__all__(ssa_temp_4),
  (ssa_temp_5 = ssa_temp_4, ssa_temp_4 = a),
  GF_4A_id(ssa_temp_6, ssa_temp_5),
  ssa_temp_6 != 1,
  1 = 1
)

will be optimized to:

(
  GF_4A_id(ssa_temp_2, a),
  ssa_temp_2 != 1,
  R_1A7__all__(a),
  GF_4A_id(ssa_temp_6, a),
  ssa_temp_6 != 1
)

for ssa_temp_5 is replaced with ssa_temp_4 at first iteration, and ssa_temp_4 is replaced with a at next iteration.

Copy link
Collaborator

@xiexie xiexie left a comment

Choose a reason for hiding this comment

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

lgtm

@xiexie xiexie merged commit c262c41 into main Feb 11, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants