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

Prefer code duplication and break over exiting loop with goto #5676

Open
plafosse opened this issue Jun 30, 2024 · 0 comments
Open

Prefer code duplication and break over exiting loop with goto #5676

plafosse opened this issue Jun 30, 2024 · 0 comments
Labels
Component: Core Issue needs changes to the core Core: HLIL Issue involves High Level IL IL Optimization Issue involving optimization of representation (not correctness) Impact: Low Issue is a papercut or has a good, supported workaround Type: Enhancement Issue is a small enhancement to existing functionality

Comments

@plafosse
Copy link
Member

What is the feature you'd like to have?
Given code with this pattern:

140771d61                      if (a)
140771d75                          label_140771d75_1:
140771d75                          do_something1()
140771d61                      else
140771d67                          while (b)
140771d69                              do_something2()
140771d73                              if (c)
140771d73                                  goto label_140771d75_1
140771d8f                          do_something3()

Prefer code duplication and break over exiting loop with goto

if (a)
    do_something1()
else
    while (b)
        do_something2()
        if (c)
          do_something1()
          break
    do_something3()

treasure sloth surfboard sing @ 140771d61

@plafosse plafosse added Type: Enhancement Issue is a small enhancement to existing functionality Component: Core Issue needs changes to the core Core: HLIL Issue involves High Level IL IL Optimization Issue involving optimization of representation (not correctness) Impact: Low Issue is a papercut or has a good, supported workaround labels Jun 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Core Issue needs changes to the core Core: HLIL Issue involves High Level IL IL Optimization Issue involving optimization of representation (not correctness) Impact: Low Issue is a papercut or has a good, supported workaround Type: Enhancement Issue is a small enhancement to existing functionality
Projects
None yet
Development

No branches or pull requests

1 participant