Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Control-flow graph
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Loop management== A ''loop header'' (sometimes called the ''entry point'' of the loop) is a dominator that is the target of a loop-forming back edge. The loop header dominates all blocks in the loop body. A block may be a loop header for more than one loop. A loop may have multiple entry points, in which case it has no "loop header". Suppose block M is a dominator with several incoming edges, some of them being back edges (so M is a loop header). It is advantageous to several optimization passes to break M up into two blocks M<sub>pre</sub> and M<sub>loop</sub>. The contents of M and back edges are moved to M<sub>loop</sub>, the rest of the edges are moved to point into M<sub>pre</sub>, and a new edge from M<sub>pre</sub> to M<sub>loop</sub> is inserted (so that M<sub>pre</sub> is the immediate dominator of M<sub>loop</sub>). In the beginning, M<sub>pre</sub> would be empty, but passes like [[loop-invariant code motion]] could populate it. M<sub>pre</sub> is called the ''loop pre-header'', and M<sub>loop</sub> would be the loop header.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)