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
Optimizing compiler
(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!
===Local vs. global scope=== [[Scope (computer science)|Scope]] describes how much of the input code is considered to apply optimizations. Local scope optimizations use information local to a [[basic block]].<ref name="Cooper_2003">{{cite book|author-first1=Keith D.|author-last1=Cooper|author-link1=Keith D. Cooper|author-first2=Linda|author-last2=Torczon|title=Engineering a Compiler|publisher=[[Morgan Kaufmann]]|date=2003|orig-date=2002-01-01|pages=404, 407|isbn=978-1-55860-698-2}}</ref> Since basic blocks contain no control flow statements, these optimizations require minimal analysis, reducing time and storage requirements. However, no information is retained across jumps. Global scope optimizations, also known as intra-procedural optimizations, operate on individual functions.<ref name="Cooper_2003"/> This gives them more information to work with but often makes expensive computations necessary. Worst-case assumptions need to be made when function calls occur or global variables are accessed because little information about them is available.
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)