Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Control-flow graph
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
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.
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Control-flow graph
(section)
Add topic