Skip to content

Don't create loop-exiting edges if not necessary #2075

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

hhugo
Copy link
Member

@hhugo hhugo commented Jul 7, 2025

No description provided.

@vouillon
Copy link
Member

vouillon commented Jul 7, 2025

By the way, this trick of adding loop-exiting edges does not work when the loop header has no predecessor.

@hhugo
Copy link
Member Author

hhugo commented Jul 7, 2025

By the way, this trick of adding loop-exiting edges does not work when the loop header has no predecessor.

I'm guessing this can only happen if the header is the first block of a function

@hhugo
Copy link
Member Author

hhugo commented Jul 7, 2025

By the way, this trick of adding loop-exiting edges does not work when the loop header has no predecessor.

I'm guessing this can only happen if the header is the first block of a function

We could prepend an empty block to functions that start with a loop header.

@hhugo hhugo force-pushed the less-agressive-loop-exit branch from 5c828c8 to 272cae4 Compare July 7, 2025 20:58
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