<s>
In	O
computing	O
,	O
an	O
optimizing	B-Application
compiler	I-Application
is	O
a	O
compiler	B-Language
that	O
tries	O
to	O
minimize	O
or	O
maximize	O
some	O
attributes	O
of	O
an	O
executable	B-Application
computer	B-Application
program	I-Application
.	O
</s>
<s>
Common	O
requirements	O
are	O
to	O
minimize	O
a	O
program	B-Application
's	O
execution	O
time	O
,	O
memory	B-General_Concept
footprint	O
,	O
storage	O
size	O
,	O
and	O
power	O
consumption	O
(	O
the	O
last	O
three	O
being	O
popular	O
for	O
portable	B-Device
computers	I-Device
)	O
.	O
</s>
<s>
Compiler	B-Application
optimization	I-Application
is	O
generally	O
implemented	O
using	O
a	O
sequence	O
of	O
optimizing	B-Application
transformations	I-Application
,	O
algorithms	O
which	O
take	O
a	O
program	B-Application
and	O
transform	O
it	O
to	O
produce	O
a	O
semantically	O
equivalent	O
output	O
program	B-Application
that	O
uses	O
fewer	O
resources	O
or	O
executes	O
faster	O
.	O
</s>
<s>
In	O
practice	O
,	O
factors	O
such	O
as	O
the	O
programmer	B-Application
's	O
willingness	O
to	O
wait	O
for	O
the	O
compiler	B-Language
to	O
complete	O
its	O
task	O
place	O
upper	O
limits	O
on	O
the	O
optimizations	O
that	O
a	O
compiler	B-Language
might	O
provide	O
.	O
</s>
<s>
Optimization	O
is	O
generally	O
a	O
very	O
CPU	B-General_Concept
-	O
and	O
memory-intensive	O
process	O
.	O
</s>
<s>
In	O
the	O
past	O
,	O
computer	B-General_Concept
memory	I-General_Concept
limitations	O
were	O
also	O
a	O
major	O
factor	O
in	O
limiting	O
which	O
optimizations	O
could	O
be	O
performed	O
.	O
</s>
<s>
Techniques	O
used	O
in	O
optimization	O
can	O
be	O
broken	O
up	O
among	O
various	O
scopes	O
which	O
can	O
affect	O
anything	O
from	O
a	O
single	O
statement	O
to	O
the	O
entire	O
program	B-Application
.	O
</s>
<s>
Peephole	O
optimizations	O
These	O
are	O
usually	O
performed	O
late	O
in	O
the	O
compilation	B-Language
process	O
after	O
machine	B-Language
code	I-Language
has	O
been	O
generated	O
.	O
</s>
<s>
Local	O
optimizations	O
These	O
only	O
consider	O
information	O
local	O
to	O
a	O
basic	B-Application
block	I-Application
.	O
</s>
<s>
Since	O
basic	B-Application
blocks	I-Application
have	O
no	O
control	O
flow	O
,	O
these	O
optimizations	O
need	O
very	O
little	O
analysis	O
,	O
saving	O
time	O
and	O
reducing	O
storage	O
requirements	O
,	O
but	O
this	O
also	O
means	O
that	O
no	O
information	O
is	O
preserved	O
across	O
jumps	O
.	O
</s>
<s>
Prescient	O
store	O
optimizations	O
These	O
allow	O
store	O
operations	O
to	O
occur	O
earlier	O
than	O
would	O
otherwise	O
be	O
permitted	O
in	O
the	O
context	O
of	O
threads	B-Operating_System
and	O
locks	O
.	O
</s>
<s>
The	O
purpose	O
of	O
this	O
relaxation	O
is	O
to	O
allow	O
compiler	B-Application
optimization	I-Application
to	O
perform	O
certain	O
kinds	O
of	O
code	O
rearrangement	O
that	O
preserve	O
the	O
semantics	O
of	O
properly	O
synchronized	O
programs	O
.	O
</s>
<s>
Interprocedural	O
,	O
whole-program	O
or	O
link-time	B-Application
optimization	O
These	O
analyze	O
all	O
of	O
a	O
program	B-Application
's	O
source	O
code	O
.	O
</s>
<s>
Machine	B-Language
code	I-Language
optimization	O
and	O
object	O
code	O
optimizer	O
These	O
analyze	O
the	O
executable	B-Application
task	O
image	O
of	O
the	O
program	B-Application
after	O
all	O
of	O
an	O
executable	B-Application
machine	B-Language
code	I-Language
has	O
been	O
linked	B-Application
.	O
</s>
<s>
Some	O
of	O
the	O
techniques	O
that	O
can	O
be	O
applied	O
in	O
a	O
more	O
limited	O
scope	O
,	O
such	O
as	O
macro	O
compression	O
which	O
saves	O
space	O
by	O
collapsing	O
common	O
sequences	O
of	O
instructions	O
,	O
are	O
more	O
effective	O
when	O
the	O
entire	O
executable	B-Application
task	O
image	O
is	O
available	O
for	O
analysis	O
.	O
</s>
<s>
For	O
instance	O
,	O
the	O
existence	O
of	O
pointers	O
in	O
C	B-Language
and	O
C++	B-Language
makes	O
it	O
difficult	O
to	O
optimize	O
array	O
accesses	O
(	O
see	O
alias	O
analysis	O
)	O
.	O
</s>
<s>
However	O
,	O
languages	O
such	O
as	O
PL/I	B-Language
(	O
that	O
also	O
supports	O
pointers	O
)	O
nevertheless	O
have	O
available	O
sophisticated	O
optimizing	B-Application
compilers	I-Application
to	O
achieve	O
better	O
performance	O
in	O
various	O
other	O
ways	O
.	O
</s>
<s>
Therefore	O
,	O
if	O
a	O
program	B-Application
makes	O
several	O
calls	O
to	O
the	O
same	O
function	O
with	O
the	O
same	O
arguments	O
,	O
the	O
compiler	B-Language
can	O
immediately	O
infer	O
that	O
the	O
function	O
's	O
result	O
need	O
be	O
computed	O
only	O
once	O
.	O
</s>
<s>
Machine-independent	O
vs.	O
machine-dependent	O
Many	O
optimizations	O
that	O
operate	O
on	O
abstract	O
programming	O
concepts	O
(	O
loops	O
,	O
objects	O
,	O
structures	O
)	O
are	O
independent	O
of	O
the	O
machine	O
targeted	O
by	O
the	O
compiler	B-Language
,	O
but	O
many	O
of	O
the	O
most	O
effective	O
optimizations	O
are	O
those	O
that	O
best	O
exploit	O
special	O
features	O
of	O
the	O
target	O
platform	O
.	O
</s>
<s>
Examples	O
are	O
instructions	O
which	O
do	O
several	O
things	O
at	O
once	O
,	O
such	O
as	O
decrement	O
register	B-General_Concept
and	O
branch	O
if	O
not	O
zero	O
.	O
</s>
<s>
To	O
set	O
a	O
register	B-General_Concept
to	O
0	O
,	O
the	O
obvious	O
way	O
is	O
to	O
use	O
the	O
constant	O
'	O
0	O
 '	O
in	O
an	O
instruction	O
that	O
sets	O
a	O
register	B-General_Concept
value	O
to	O
a	O
constant	O
.	O
</s>
<s>
A	O
less	O
obvious	O
way	O
is	O
to	O
XOR	B-Application
a	O
register	B-General_Concept
with	O
itself	O
.	O
</s>
<s>
It	O
is	O
up	O
to	O
the	O
compiler	B-Language
to	O
know	O
which	O
instruction	O
variant	O
to	O
use	O
.	O
</s>
<s>
On	O
many	O
RISC	B-Architecture
machines	O
,	O
both	O
instructions	O
would	O
be	O
equally	O
appropriate	O
,	O
since	O
they	O
would	O
both	O
be	O
the	O
same	O
length	O
and	O
take	O
the	O
same	O
time	O
.	O
</s>
<s>
On	O
many	O
other	O
microprocessors	B-Architecture
such	O
as	O
the	O
Intel	B-Operating_System
x86	I-Operating_System
family	O
,	O
it	O
turns	O
out	O
that	O
the	O
XOR	B-Application
variant	O
is	O
shorter	O
and	O
probably	O
faster	O
,	O
as	O
there	O
will	O
be	O
no	O
need	O
to	O
decode	O
an	O
immediate	O
operand	O
,	O
nor	O
use	O
the	O
internal	O
"	O
immediate	O
operand	O
register	B-General_Concept
"	O
.	O
</s>
<s>
A	O
potential	O
problem	O
with	O
this	O
is	O
that	O
XOR	B-Application
may	O
introduce	O
a	O
data	O
dependency	O
on	O
the	O
previous	O
value	O
of	O
the	O
register	B-General_Concept
,	O
causing	O
a	O
pipeline	B-General_Concept
stall	I-General_Concept
.	O
</s>
<s>
However	O
,	O
processors	O
often	O
have	O
XOR	B-Application
of	O
a	O
register	B-General_Concept
with	O
itself	O
as	O
a	O
special	O
case	O
that	O
does	O
not	O
cause	O
stalls	O
.	O
</s>
<s>
It	O
is	O
sometimes	O
possible	O
to	O
parameterize	O
some	O
of	O
these	O
machine	O
dependent	O
factors	O
,	O
so	O
that	O
a	O
single	O
piece	O
of	O
compiler	B-Language
code	O
can	O
be	O
used	O
to	O
optimize	O
different	O
machines	O
just	O
by	O
altering	O
the	O
machine	O
description	O
parameters	O
.	O
</s>
<s>
GCC	B-Application
from	O
GNU	B-Application
Project	I-Application
and	O
Clang	B-Application
from	O
the	O
LLVM	B-Application
Compiler	I-Application
Infrastructure	I-Application
are	O
examples	O
of	O
optimizing	B-Application
compilers	I-Application
that	O
follow	O
this	O
approach	O
.	O
</s>
<s>
The	O
architecture	O
of	O
the	O
target	O
CPU	B-General_Concept
Number	O
of	O
CPU	B-General_Concept
registers	I-General_Concept
:	O
To	O
a	O
certain	O
extent	O
,	O
the	O
more	O
registers	B-General_Concept
,	O
the	O
easier	O
it	O
is	O
to	O
optimize	O
for	O
performance	O
.	O
</s>
<s>
Local	O
variables	O
can	O
be	O
allocated	O
in	O
the	O
registers	B-General_Concept
and	O
not	O
on	O
the	O
stack	B-Application
.	O
</s>
<s>
Temporary/intermediate	O
results	O
can	O
be	O
left	O
in	O
registers	B-General_Concept
without	O
writing	O
to	O
and	O
reading	O
back	O
from	O
memory	B-General_Concept
.	O
</s>
<s>
RISC	B-Architecture
vs	O
CISC	B-Architecture
:	O
CISC	B-Architecture
instruction	O
sets	O
often	O
have	O
variable	O
instruction	O
lengths	O
,	O
often	O
have	O
a	O
larger	O
number	O
of	O
possible	O
instructions	O
that	O
can	O
be	O
used	O
,	O
and	O
each	O
instruction	O
could	O
take	O
differing	O
amounts	O
of	O
time	O
.	O
</s>
<s>
RISC	B-Architecture
instruction	I-Architecture
sets	I-Architecture
attempt	O
to	O
limit	O
the	O
variability	O
in	O
each	O
of	O
these	O
:	O
instruction	O
sets	O
are	O
usually	O
constant	O
length	O
,	O
with	O
few	O
exceptions	O
,	O
there	O
are	O
usually	O
fewer	O
combinations	O
of	O
registers	B-General_Concept
and	O
memory	B-General_Concept
operations	O
,	O
and	O
the	O
instruction	O
issue	O
rate	O
(	O
the	O
number	O
of	O
instructions	O
completed	O
per	O
time	O
period	O
,	O
usually	O
an	O
integer	O
multiple	O
of	O
the	O
clock	O
cycle	O
)	O
is	O
usually	O
constant	O
in	O
cases	O
where	O
memory	B-General_Concept
latency	O
is	O
not	O
a	O
factor	O
.	O
</s>
<s>
There	O
may	O
be	O
several	O
ways	O
of	O
carrying	O
out	O
a	O
certain	O
task	O
,	O
with	O
CISC	B-Architecture
usually	O
offering	O
more	O
alternatives	O
than	O
RISC	B-Architecture
.	O
</s>
<s>
Compilers	B-Language
have	O
to	O
know	O
the	O
relative	O
costs	O
among	O
the	O
various	O
instructions	O
and	O
choose	O
the	O
best	O
instruction	O
sequence	O
(	O
see	O
instruction	O
selection	O
)	O
.	O
</s>
<s>
Pipelines	B-General_Concept
:	O
A	O
pipeline	B-General_Concept
is	O
essentially	O
a	O
CPU	B-General_Concept
broken	O
up	O
into	O
an	O
assembly	O
line	O
.	O
</s>
<s>
It	O
allows	O
use	O
of	O
parts	O
of	O
the	O
CPU	B-General_Concept
for	O
different	O
instructions	O
by	O
breaking	O
up	O
the	O
execution	O
of	O
instructions	O
into	O
various	O
stages	O
:	O
instruction	O
decode	O
,	O
address	O
decode	O
,	O
memory	B-General_Concept
fetch	O
,	O
register	B-General_Concept
fetch	O
,	O
compute	O
,	O
register	B-General_Concept
store	O
,	O
etc	O
.	O
</s>
<s>
One	O
instruction	O
could	O
be	O
in	O
the	O
register	B-General_Concept
store	O
stage	O
,	O
while	O
another	O
could	O
be	O
in	O
the	O
register	B-General_Concept
fetch	O
stage	O
.	O
</s>
<s>
Pipeline	B-General_Concept
conflicts	O
occur	O
when	O
an	O
instruction	O
in	O
one	O
stage	O
of	O
the	O
pipeline	B-General_Concept
depends	O
on	O
the	O
result	O
of	O
another	O
instruction	O
ahead	O
of	O
it	O
in	O
the	O
pipeline	B-General_Concept
but	O
not	O
yet	O
completed	O
.	O
</s>
<s>
Pipeline	B-General_Concept
conflicts	O
can	O
lead	O
to	O
pipeline	B-General_Concept
stalls	I-General_Concept
:	O
where	O
the	O
CPU	B-General_Concept
wastes	O
cycles	O
waiting	O
for	O
a	O
conflict	O
to	O
resolve	O
.	O
</s>
<s>
Compilers	B-Language
can	O
schedule	O
,	O
or	O
reorder	O
,	O
instructions	O
so	O
that	O
pipeline	B-General_Concept
stalls	I-General_Concept
occur	O
less	O
frequently	O
.	O
</s>
<s>
Number	B-General_Concept
of	I-General_Concept
functional	I-General_Concept
units	I-General_Concept
:	O
Some	O
CPUs	B-Device
have	O
several	O
ALUs	B-General_Concept
and	O
FPUs	B-General_Concept
.	O
</s>
<s>
They	O
also	O
have	O
issues	O
similar	O
to	O
pipeline	B-General_Concept
conflicts	O
.	O
</s>
<s>
Cache	B-General_Concept
size	O
(	O
256kiB	O
–	O
12MiB	O
)	O
and	O
type	O
(	O
direct	O
mapped	O
,	O
2-/4-/8-/16	O
-way	O
associative	O
,	O
fully	O
associative	O
)	O
:	O
Techniques	O
such	O
as	O
inline	O
expansion	O
and	O
loop	B-Operating_System
unrolling	I-Operating_System
may	O
increase	O
the	O
size	O
of	O
the	O
generated	O
code	O
and	O
reduce	O
code	B-General_Concept
locality	I-General_Concept
.	O
</s>
<s>
The	O
program	B-Application
may	O
slow	O
down	O
drastically	O
if	O
a	O
highly	O
utilized	O
section	O
of	O
code	O
(	O
like	O
inner	O
loops	O
in	O
various	O
algorithms	O
)	O
suddenly	O
cannot	O
fit	O
in	O
the	O
cache	B-General_Concept
.	O
</s>
<s>
Also	O
,	O
caches	B-General_Concept
which	O
are	O
not	O
fully	O
associative	O
have	O
higher	O
chances	O
of	O
cache	B-General_Concept
collisions	O
even	O
in	O
an	O
unfilled	O
cache	B-General_Concept
.	O
</s>
<s>
Cache/Memory	O
transfer	O
rates	O
:	O
These	O
give	O
the	O
compiler	B-Language
an	O
indication	O
of	O
the	O
penalty	O
for	O
cache	B-General_Concept
misses	O
.	O
</s>
<s>
Debugging	O
While	O
writing	O
an	O
application	O
,	O
a	O
programmer	B-Application
will	O
recompile	B-Language
and	O
test	O
often	O
,	O
and	O
so	O
compilation	B-Language
must	O
be	O
fast	O
.	O
</s>
<s>
Also	O
,	O
program	B-Application
code	O
is	O
usually	O
"	O
stepped	O
through	O
"	O
(	O
see	O
Program	B-Application
animation	O
)	O
using	O
a	O
symbolic	B-Application
debugger	I-Application
,	O
and	O
optimizing	B-Application
transformations	I-Application
,	O
particularly	O
those	O
that	O
reorder	O
code	O
,	O
can	O
make	O
it	O
difficult	O
to	O
relate	O
the	O
output	O
code	O
with	O
the	O
line	O
numbers	O
in	O
the	O
original	O
source	O
code	O
.	O
</s>
<s>
This	O
can	O
confuse	O
both	O
the	O
debugging	B-Application
tools	I-Application
and	O
the	O
programmers	B-Application
using	O
them	O
.	O
</s>
<s>
General-purpose	O
use	O
Prepackaged	O
software	O
is	O
very	O
often	O
expected	O
to	O
be	O
executed	O
on	O
a	O
variety	O
of	O
machines	O
and	O
CPUs	B-Device
that	O
may	O
share	O
the	O
same	O
instruction	O
set	O
,	O
but	O
have	O
different	O
timing	O
,	O
cache	B-General_Concept
or	O
memory	B-General_Concept
characteristics	O
.	O
</s>
<s>
As	O
a	O
result	O
,	O
the	O
code	O
may	O
not	O
be	O
tuned	O
to	O
any	O
particular	O
CPU	B-General_Concept
,	O
or	O
may	O
be	O
tuned	O
to	O
work	O
best	O
on	O
the	O
most	O
popular	O
CPU	B-General_Concept
and	O
yet	O
still	O
work	O
acceptably	O
well	O
on	O
other	O
CPUs	B-Device
.	O
</s>
<s>
Special-purpose	O
use	O
If	O
the	O
software	O
is	O
compiled	B-Language
to	O
be	O
used	O
on	O
one	O
or	O
a	O
few	O
very	O
similar	O
machines	O
,	O
with	O
known	O
characteristics	O
,	O
then	O
the	O
compiler	B-Language
can	O
heavily	O
tune	O
the	O
generated	O
code	O
to	O
those	O
specific	O
machines	O
,	O
provided	O
such	O
options	O
are	O
available	O
.	O
</s>
<s>
Important	O
special	O
cases	O
include	O
code	O
designed	O
for	O
parallel	B-Operating_System
and	O
vector	B-Operating_System
processors	I-Operating_System
,	O
for	O
which	O
special	O
parallelizing	O
compilers	B-Language
are	O
employed	O
.	O
</s>
<s>
Embedded	B-Architecture
systems	I-Architecture
These	O
are	O
a	O
common	O
case	O
of	O
special-purpose	O
use	O
.	O
</s>
<s>
Embedded	O
software	O
can	O
be	O
tightly	O
tuned	O
to	O
an	O
exact	O
CPU	B-General_Concept
and	O
memory	B-General_Concept
size	O
.	O
</s>
<s>
For	O
example	O
,	O
compilers	B-Language
for	O
embedded	O
software	O
usually	O
offer	O
options	O
that	O
reduce	O
code	O
size	O
at	O
the	O
expense	O
of	O
speed	O
,	O
because	O
memory	B-General_Concept
is	O
the	O
main	O
cost	O
of	O
an	O
embedded	B-Architecture
computer	I-Architecture
.	O
</s>
<s>
The	O
code	O
's	O
timing	O
may	O
need	O
to	O
be	O
predictable	O
,	O
rather	O
than	O
as	O
fast	O
as	O
possible	O
,	O
so	O
code	O
caching	B-General_Concept
might	O
be	O
disabled	O
,	O
along	O
with	O
compiler	B-Application
optimizations	I-Application
that	O
require	O
it	O
.	O
</s>
<s>
To	O
a	O
large	O
extent	O
,	O
compiler	B-Application
optimization	I-Application
techniques	I-Application
have	O
the	O
following	O
themes	O
,	O
which	O
sometimes	O
conflict	O
.	O
</s>
<s>
Optimize	O
the	O
common	O
case	O
The	O
common	O
case	O
may	O
have	O
unique	O
properties	O
that	O
allow	O
a	O
fast	B-General_Concept
path	I-General_Concept
at	O
the	O
expense	O
of	O
a	O
slow	O
path	O
.	O
</s>
<s>
If	O
the	O
fast	B-General_Concept
path	I-General_Concept
is	O
taken	O
most	O
often	O
,	O
the	O
result	O
is	O
better	O
overall	O
performance	O
.	O
</s>
<s>
Less	O
work	O
for	O
the	O
CPU	B-General_Concept
,	O
cache	B-General_Concept
,	O
and	O
memory	B-General_Concept
usually	O
results	O
in	O
faster	O
execution	O
.	O
</s>
<s>
Alternatively	O
,	O
in	O
embedded	B-Architecture
systems	I-Architecture
,	O
less	O
code	O
brings	O
a	O
lower	O
product	O
cost	O
.	O
</s>
<s>
Jumps	O
(	O
conditional	O
or	O
unconditional	B-General_Concept
branches	I-General_Concept
)	O
interfere	O
with	O
the	O
prefetching	O
of	O
instructions	O
,	O
thus	O
slowing	O
down	O
code	O
.	O
</s>
<s>
Using	O
inlining	O
or	O
loop	B-Operating_System
unrolling	I-Operating_System
can	O
reduce	O
branching	O
,	O
at	O
the	O
cost	O
of	O
increasing	O
binary	O
file	O
size	O
by	O
the	O
length	O
of	O
the	O
repeated	O
code	O
.	O
</s>
<s>
This	O
tends	O
to	O
merge	O
several	O
basic	B-Application
blocks	I-Application
into	O
one	O
.	O
</s>
<s>
Locality	O
Code	O
and	O
data	O
that	O
are	O
accessed	O
closely	O
together	O
in	O
time	O
should	O
be	O
placed	O
close	O
together	O
in	O
memory	B-General_Concept
to	O
increase	O
spatial	O
locality	B-General_Concept
of	I-General_Concept
reference	I-General_Concept
.	O
</s>
<s>
Exploit	O
the	O
memory	B-General_Concept
hierarchy	I-General_Concept
Accesses	O
to	O
memory	B-General_Concept
are	O
increasingly	O
more	O
expensive	O
for	O
each	O
level	O
of	O
the	O
memory	B-General_Concept
hierarchy	I-General_Concept
,	O
so	O
place	O
the	O
most	O
commonly	O
used	O
items	O
in	O
registers	B-General_Concept
first	O
,	O
then	O
caches	B-General_Concept
,	O
then	O
main	O
memory	B-General_Concept
,	O
before	O
going	O
to	O
disk	O
.	O
</s>
<s>
Parallelize	O
Reorder	O
operations	O
to	O
allow	O
multiple	O
computations	O
to	O
happen	O
in	O
parallel	B-Operating_System
,	O
either	O
at	O
the	O
instruction	O
,	O
memory	B-General_Concept
,	O
or	O
thread	B-Operating_System
level	O
.	O
</s>
<s>
More	O
precise	O
information	O
is	O
better	O
The	O
more	O
precise	O
the	O
information	O
the	O
compiler	B-Language
has	O
,	O
the	O
better	O
it	O
can	O
employ	O
any	O
or	O
all	O
of	O
these	O
optimization	O
techniques	O
.	O
</s>
<s>
Information	O
gathered	O
at	O
runtime	O
,	O
ideally	O
with	O
minimal	O
overhead	O
,	O
can	O
be	O
used	O
by	O
a	O
JIT	O
compiler	B-Language
to	O
dynamically	O
improve	O
optimization	O
.	O
</s>
<s>
This	O
is	O
a	O
strength	O
reduction	O
,	O
and	O
also	O
may	O
allow	O
the	O
index	O
variable	O
's	O
definitions	O
to	O
become	O
dead	B-Application
code	I-Application
.	O
</s>
<s>
This	O
information	O
is	O
also	O
useful	O
for	O
bounds-checking	B-Error_Name
elimination	I-Error_Name
and	O
dependence	O
analysis	O
,	O
among	O
other	O
things	O
.	O
</s>
<s>
This	O
can	O
improve	O
locality	B-General_Concept
of	I-General_Concept
reference	I-General_Concept
,	O
both	O
of	O
the	O
data	O
being	O
accessed	O
in	O
the	O
loop	O
and	O
the	O
code	O
in	O
the	O
loop	O
's	O
body	O
.	O
</s>
<s>
When	O
two	O
adjacent	O
loops	O
would	O
iterate	B-Algorithm
the	O
same	O
number	O
of	O
times	O
regardless	O
of	O
whether	O
that	O
number	O
is	O
known	O
at	O
compile	B-Language
time	O
,	O
their	O
bodies	O
can	O
be	O
combined	O
as	O
long	O
as	O
they	O
make	O
no	O
reference	O
to	O
each	O
other	O
's	O
data	O
.	O
</s>
<s>
Doing	O
so	O
duplicates	O
the	O
condition	O
check	O
(	O
increasing	O
the	O
size	O
of	O
the	O
code	O
)	O
,	O
but	O
is	O
more	O
efficient	O
because	O
jumps	O
usually	O
cause	O
a	O
pipeline	B-General_Concept
stall	I-General_Concept
.	O
</s>
<s>
Additionally	O
,	O
if	O
the	O
initial	O
condition	O
is	O
known	O
at	O
compile-time	O
and	O
is	O
known	O
to	O
be	O
side-effect-free	O
,	O
the	O
if	O
guard	O
can	O
be	O
skipped	O
.	O
</s>
<s>
When	O
the	O
loop	O
variables	O
index	O
into	O
an	O
array	O
,	O
such	O
a	O
transformation	O
can	O
improve	O
locality	B-General_Concept
of	I-General_Concept
reference	I-General_Concept
,	O
depending	O
on	O
the	O
array	O
's	O
layout	O
.	O
</s>
<s>
Loop-invariant	O
code	O
motion	O
If	O
a	O
quantity	O
is	O
computed	O
inside	O
a	O
loop	O
during	O
every	O
iteration	B-Algorithm
,	O
and	O
its	O
value	O
is	O
the	O
same	O
for	O
each	O
iteration	B-Algorithm
,	O
it	O
can	O
vastly	O
improve	O
efficiency	O
to	O
hoist	O
it	O
outside	O
the	O
loop	O
and	O
compute	O
its	O
value	O
just	O
once	O
before	O
the	O
loop	O
begins	O
.	O
</s>
<s>
Loop	O
nest	O
optimization	O
Some	O
pervasive	O
algorithms	O
such	O
as	O
matrix	O
multiplication	O
have	O
very	O
poor	O
cache	B-General_Concept
behavior	O
and	O
excessive	O
memory	B-General_Concept
accesses	O
.	O
</s>
<s>
Loop	O
nest	O
optimization	O
increases	O
the	O
number	O
of	O
cache	B-General_Concept
hits	O
by	O
performing	O
the	O
operation	O
over	O
small	O
blocks	O
and	O
by	O
using	O
a	O
loop	O
interchange	O
.	O
</s>
<s>
Furthermore	O
,	O
on	O
some	O
architectures	O
,	O
loop	O
reversal	O
contributes	O
to	O
smaller	O
code	O
,	O
as	O
when	O
the	O
loop	O
index	O
is	O
being	O
decremented	O
,	O
the	O
condition	O
that	O
needs	O
to	O
be	O
met	O
in	O
order	O
for	O
the	O
running	O
program	B-Application
to	O
exit	O
the	O
loop	O
is	O
a	O
comparison	O
with	O
zero	O
.	O
</s>
<s>
Loop	B-Operating_System
unrolling	I-Operating_System
Unrolling	O
duplicates	O
the	O
body	O
of	O
the	O
loop	O
multiple	O
times	O
,	O
in	O
order	O
to	O
decrease	O
the	O
number	O
of	O
times	O
the	O
loop	O
condition	O
is	O
tested	O
and	O
the	O
number	O
of	O
jumps	O
,	O
which	O
hurt	O
performance	O
by	O
impairing	O
the	O
instruction	B-General_Concept
pipeline	I-General_Concept
.	O
</s>
<s>
Completely	O
unrolling	O
a	O
loop	O
eliminates	O
all	O
overhead	O
,	O
but	O
requires	O
that	O
the	O
number	O
of	O
iterations	B-Algorithm
be	O
known	O
at	O
compile	B-Language
time	O
.	O
</s>
<s>
Loop	O
splitting	O
Loop	O
splitting	O
attempts	O
to	O
simplify	O
a	O
loop	O
or	O
eliminate	O
dependencies	O
by	O
breaking	O
it	O
into	O
multiple	O
loops	O
which	O
have	O
the	O
same	O
bodies	O
but	O
iterate	B-Algorithm
over	O
different	O
contiguous	O
portions	O
of	O
the	O
index	O
range	O
.	O
</s>
<s>
A	O
useful	O
special	O
case	O
is	O
loop	O
peeling	O
,	O
which	O
can	O
simplify	O
a	O
loop	O
with	O
a	O
problematic	O
first	O
iteration	B-Algorithm
by	O
performing	O
that	O
iteration	B-Algorithm
separately	O
before	O
entering	O
the	O
loop	O
.	O
</s>
<s>
Software	O
pipelining	O
The	O
loop	O
is	O
restructured	O
in	O
such	O
a	O
way	O
that	O
work	O
done	O
in	O
an	O
iteration	B-Algorithm
is	O
split	O
into	O
several	O
parts	O
and	O
done	O
over	O
several	O
iterations	B-Algorithm
.	O
</s>
<s>
Automatic	O
parallelization	B-Operating_System
A	O
loop	O
is	O
converted	O
into	O
multi-threaded	B-Operating_System
or	O
vectorized	O
(	O
or	O
even	O
both	O
)	O
code	O
in	O
order	O
to	O
utilize	O
multiple	O
processors	O
simultaneously	O
in	O
a	O
shared-memory	O
multiprocessor	O
(	O
SMP	O
)	O
machine	O
,	O
including	O
multi-core	O
machines	O
.	O
</s>
<s>
Data-flow	B-Application
optimizations	O
,	O
based	O
on	O
data-flow	B-Application
analysis	O
,	O
primarily	O
depend	O
on	O
how	O
certain	O
properties	O
of	O
data	O
are	O
propagated	O
by	O
control	O
edges	O
in	O
the	O
control-flow	O
graph	O
.	O
</s>
<s>
Compilers	B-Language
implementing	O
this	O
technique	O
realize	O
that	O
(	O
a	O
+	O
b	O
)	O
will	O
not	O
change	O
,	O
and	O
so	O
only	O
calculate	O
its	O
value	O
once	O
.	O
</s>
<s>
Constant	O
folding	O
and	O
propagation	O
replacing	O
expressions	O
consisting	O
of	O
constants	O
(	O
e.g.	O
,	O
3	O
+	O
5	O
)	O
with	O
their	O
final	O
value	O
(	O
8	O
)	O
at	O
compile	B-Language
time	O
,	O
rather	O
than	O
doing	O
the	O
calculation	O
in	O
run-time	O
.	O
</s>
<s>
Alias	O
classification	O
and	O
pointer	O
analysis	O
in	O
the	O
presence	O
of	O
pointers	O
,	O
it	O
is	O
difficult	O
to	O
make	O
any	O
optimizations	O
at	O
all	O
,	O
since	O
potentially	O
any	O
variable	O
can	O
have	O
been	O
changed	O
when	O
a	O
memory	B-General_Concept
location	O
is	O
assigned	O
to	O
.	O
</s>
<s>
Dead-store	B-General_Concept
elimination	O
removal	O
of	O
assignments	O
to	O
variables	O
that	O
are	O
not	O
subsequently	O
read	O
,	O
either	O
because	O
the	O
lifetime	O
of	O
the	O
variable	O
ends	O
or	O
because	O
of	O
a	O
subsequent	O
assignment	O
that	O
will	O
overwrite	O
the	O
first	O
value	O
.	O
</s>
<s>
These	O
optimizations	O
are	O
intended	O
to	O
be	O
done	O
after	O
transforming	O
the	O
program	B-Application
into	O
a	O
special	O
form	O
called	O
Static	O
Single	O
Assignment	O
,	O
in	O
which	O
every	O
variable	O
is	O
assigned	O
in	O
only	O
one	O
place	O
.	O
</s>
<s>
Many	O
optimizations	O
listed	O
in	O
other	O
sections	O
also	O
benefit	O
with	O
no	O
special	O
changes	O
,	O
such	O
as	O
register	B-General_Concept
allocation	O
.	O
</s>
<s>
Global	O
value	O
numbering	O
GVN	O
eliminates	O
redundancy	O
by	O
constructing	O
a	O
value	O
graph	O
of	O
the	O
program	B-Application
,	O
and	O
then	O
determining	O
which	O
values	O
are	O
computed	O
by	O
equivalent	O
expressions	O
.	O
</s>
<s>
This	O
optimization	O
symbolically	O
executes	O
the	O
program	B-Application
,	O
simultaneously	O
propagating	O
constant	O
values	O
and	O
eliminating	O
portions	O
of	O
the	O
control-flow	O
graph	O
that	O
this	O
makes	O
unreachable	O
.	O
</s>
<s>
Register	B-General_Concept
allocation	O
The	O
most	O
frequently	O
used	O
variables	O
should	O
be	O
kept	O
in	O
processor	B-General_Concept
registers	I-General_Concept
for	O
fastest	O
access	O
.	O
</s>
<s>
To	O
find	O
which	O
variables	O
to	O
put	O
in	O
registers	B-General_Concept
,	O
an	O
interference-graph	O
is	O
created	O
.	O
</s>
<s>
This	O
graph	O
is	O
colored	O
using	O
for	O
example	O
Chaitin	B-Algorithm
's	I-Algorithm
algorithm	I-Algorithm
using	O
the	O
same	O
number	O
of	O
colors	O
as	O
there	O
are	O
registers	B-General_Concept
.	O
</s>
<s>
If	O
the	O
coloring	O
fails	O
one	O
variable	O
is	O
"	O
spilled	O
"	O
to	O
memory	B-General_Concept
and	O
the	O
coloring	O
is	O
retried	O
.	O
</s>
<s>
Instruction	O
selection	O
Most	O
architectures	O
,	O
particularly	O
CISC	B-Architecture
architectures	I-Architecture
and	O
those	O
with	O
many	O
addressing	B-Language
modes	I-Language
,	O
offer	O
several	O
different	O
ways	O
of	O
performing	O
a	O
particular	O
operation	O
,	O
using	O
entirely	O
different	O
sequences	O
of	O
instructions	O
.	O
</s>
<s>
The	O
job	O
of	O
the	O
instruction	O
selector	O
is	O
to	O
do	O
a	O
good	O
job	O
overall	O
of	O
choosing	O
which	O
instructions	O
to	O
implement	O
which	O
operators	O
in	O
the	O
low-level	O
intermediate	B-Application
representation	I-Application
with	O
.	O
</s>
<s>
For	O
example	O
,	O
on	O
many	O
processors	O
in	O
the	O
68000	B-Device
family	I-Device
and	O
on	O
the	O
x86	B-Operating_System
architecture	I-Operating_System
,	O
complex	O
addressing	B-Language
modes	I-Language
can	O
be	O
used	O
in	O
statements	O
like	O
"	O
lea	O
25( a1	O
,	O
d5*4	O
)	O
,	O
a0	O
"	O
,	O
allowing	O
a	O
single	O
instruction	O
to	O
perform	O
a	O
significant	O
amount	O
of	O
arithmetic	O
with	O
less	O
storage	O
.	O
</s>
<s>
Instruction	O
scheduling	O
Instruction	O
scheduling	O
is	O
an	O
important	O
optimization	O
for	O
modern	O
pipelined	B-General_Concept
processors	I-General_Concept
,	O
which	O
avoids	O
stalls	O
or	O
bubbles	B-General_Concept
in	O
the	O
pipeline	B-General_Concept
by	O
clustering	O
instructions	O
with	O
no	O
dependencies	O
together	O
,	O
while	O
being	O
careful	O
to	O
preserve	O
the	O
original	O
semantics	O
.	O
</s>
<s>
Rematerialization	O
Rematerialization	O
recalculates	O
a	O
value	O
instead	O
of	O
loading	O
it	O
from	O
memory	B-General_Concept
,	O
preventing	O
a	O
memory	B-General_Concept
access	O
.	O
</s>
<s>
This	O
is	O
performed	O
in	O
tandem	O
with	O
register	B-General_Concept
allocation	O
to	O
avoid	O
spills	O
.	O
</s>
<s>
This	O
can	O
often	O
share	O
code	O
for	O
subroutine	O
set-up	O
and	O
sometimes	O
tail-recursion	B-Language
.	O
</s>
<s>
Trampolines	B-General_Concept
Many	O
CPUs	B-Device
have	O
smaller	O
subroutine	O
call	O
instructions	O
to	O
access	O
low	O
memory	B-General_Concept
.	O
</s>
<s>
A	O
compiler	B-Language
can	O
save	O
space	O
by	O
using	O
these	O
small	O
calls	O
in	O
the	O
main	O
body	O
of	O
code	O
.	O
</s>
<s>
Jump	O
instructions	O
in	O
low	O
memory	B-General_Concept
can	O
access	O
the	O
routines	O
at	O
any	O
address	O
.	O
</s>
<s>
Reordering	O
computations	O
Based	O
on	O
integer	B-Algorithm
linear	I-Algorithm
programming	I-Algorithm
,	O
restructuring	O
compilers	B-Language
enhance	O
data	B-General_Concept
locality	I-General_Concept
and	O
expose	O
more	O
parallelism	B-Operating_System
by	O
reordering	O
computations	O
.	O
</s>
<s>
Although	O
many	O
of	O
these	O
also	O
apply	O
to	O
non-functional	O
languages	O
,	O
they	O
either	O
originate	O
in	O
or	O
are	O
particularly	O
critical	O
in	O
functional	B-Language
languages	I-Language
such	O
as	O
Lisp	B-Language
and	O
ML	B-Language
.	O
</s>
<s>
Tail-call	B-Language
optimization	I-Language
A	O
function	O
call	O
consumes	O
stack	B-Application
space	O
and	O
involves	O
some	O
overhead	O
related	O
to	O
parameter	O
passing	O
and	O
flushing	O
the	O
instruction	O
cache	B-General_Concept
.	O
</s>
<s>
Tail-recursive	B-Language
algorithms	O
can	O
be	O
converted	O
to	O
iteration	B-Algorithm
through	O
a	O
process	O
called	O
tail-recursion	B-Language
elimination	O
or	O
tail-call	B-Language
optimization	I-Language
.	O
</s>
<s>
Deforestation	B-Application
(	O
data	B-General_Concept
structure	I-General_Concept
fusion	O
)	O
In	O
languages	O
where	O
it	O
is	O
common	O
for	O
a	O
sequence	O
of	O
transformations	O
to	O
be	O
applied	O
to	O
a	O
list	O
,	O
deforestation	B-Application
attempts	O
to	O
remove	O
the	O
construction	O
of	O
intermediate	O
data	B-General_Concept
structures	I-General_Concept
.	O
</s>
<s>
Bounds-checking	B-Error_Name
elimination	I-Error_Name
Many	O
languages	O
,	O
such	O
as	O
Java	B-Language
,	O
enforce	O
bounds	B-Data_Structure
checking	I-Data_Structure
of	O
all	O
array	O
accesses	O
.	O
</s>
<s>
Bounds-checking	B-Error_Name
elimination	I-Error_Name
allows	O
the	O
compiler	B-Language
to	O
safely	O
remove	O
bounds	B-Data_Structure
checking	I-Data_Structure
in	O
many	O
situations	O
where	O
it	O
can	O
determine	O
that	O
the	O
index	O
must	O
fall	O
within	O
valid	O
bounds	O
;	O
for	O
example	O
,	O
if	O
it	O
is	O
a	O
simple	O
loop	O
variable	O
.	O
</s>
<s>
Code-block	O
reordering	O
Code-block	O
reordering	O
alters	O
the	O
order	O
of	O
the	O
basic	B-Application
blocks	I-Application
in	O
a	O
program	B-Application
in	O
order	O
to	O
reduce	O
conditional	B-General_Concept
branches	I-General_Concept
and	O
improve	O
locality	B-General_Concept
of	I-General_Concept
reference	I-General_Concept
.	O
</s>
<s>
Dead-code	O
elimination	O
Removes	O
instructions	O
that	O
will	O
not	O
affect	O
the	O
behaviour	O
of	O
the	O
program	B-Application
,	O
for	O
example	O
definitions	O
which	O
have	O
no	O
uses	O
,	O
called	O
dead	B-Application
code	I-Application
.	O
</s>
<s>
Factoring	O
out	O
of	O
invariants	O
(	O
loop	B-Application
invariants	I-Application
)	O
If	O
an	O
expression	O
is	O
carried	O
out	O
both	O
when	O
a	O
condition	O
is	O
met	O
and	O
is	O
not	O
met	O
,	O
it	O
can	O
be	O
written	O
just	O
once	O
outside	O
of	O
the	O
conditional	O
statement	O
.	O
</s>
<s>
The	O
statements	O
of	O
imperative	B-Application
programming	I-Application
languages	I-Application
are	O
also	O
an	O
example	O
of	O
such	O
an	O
optimization	O
.	O
</s>
<s>
Jump	O
threading	O
In	O
this	O
optimization	O
,	O
consecutive	O
conditional	B-General_Concept
jumps	I-General_Concept
predicated	O
entirely	O
or	O
partially	O
on	O
the	O
same	O
condition	O
are	O
merged	O
.	O
</s>
<s>
This	O
is	O
most	O
effectively	O
done	O
as	O
a	O
machine	B-Language
code	I-Language
optimization	O
,	O
when	O
all	O
the	O
code	O
is	O
present	O
.	O
</s>
<s>
The	O
technique	O
was	O
first	O
used	O
to	O
conserve	O
space	O
in	O
an	O
interpretive	O
byte	O
stream	O
used	O
in	O
an	O
implementation	O
of	O
Macro	B-Application
Spitbol	I-Application
on	O
microcomputers	B-Architecture
.	O
</s>
<s>
Stack-height	O
reduction	O
Rearrange	O
expression	O
tree	O
to	O
minimize	O
resources	O
needed	O
for	O
expression	O
evaluation	O
.	O
</s>
<s>
Interprocedural	O
optimization	O
works	O
on	O
the	O
entire	O
program	B-Application
,	O
across	O
procedure	O
and	O
file	O
boundaries	O
.	O
</s>
<s>
As	O
usual	O
,	O
the	O
compiler	B-Language
needs	O
to	O
perform	O
interprocedural	O
analysis	O
before	O
its	O
actual	O
optimizations	O
.	O
</s>
<s>
Interprocedural	O
analyses	O
include	O
alias	O
analysis	O
,	O
array	B-Application
access	I-Application
analysis	I-Application
,	O
and	O
the	O
construction	O
of	O
a	O
call	B-Application
graph	I-Application
.	O
</s>
<s>
Interprocedural	O
optimization	O
is	O
common	O
in	O
modern	O
commercial	O
compilers	B-Language
from	O
SGI	O
,	O
Intel	O
,	O
Microsoft	O
,	O
and	O
Sun	O
Microsystems	O
.	O
</s>
<s>
For	O
a	O
long	O
time	O
,	O
the	O
open	O
source	O
GCC	B-Application
was	O
criticized	O
for	O
a	O
lack	O
of	O
powerful	O
interprocedural	O
analysis	O
and	O
optimizations	O
,	O
though	O
this	O
is	O
now	O
improving	O
.	O
</s>
<s>
Another	O
open	O
source	O
compiler	B-Language
with	O
full	O
analysis	O
and	O
optimization	O
infrastructure	O
is	O
Open64	B-Application
.	O
</s>
<s>
Due	O
to	O
the	O
extra	O
time	O
and	O
space	O
required	O
by	O
interprocedural	O
analysis	O
,	O
most	O
compilers	B-Language
do	O
not	O
perform	O
it	O
by	O
default	O
.	O
</s>
<s>
Users	O
must	O
use	O
compiler	B-Language
options	O
explicitly	O
to	O
tell	O
the	O
compiler	B-Language
to	O
enable	O
interprocedural	O
analysis	O
and	O
other	O
expensive	O
optimizations	O
.	O
</s>
<s>
There	O
can	O
be	O
a	O
wide	O
range	O
of	O
optimizations	O
that	O
a	O
compiler	B-Language
can	O
perform	O
,	O
ranging	O
from	O
the	O
simple	O
and	O
straightforward	O
that	O
take	O
little	O
compilation	B-Language
time	O
to	O
the	O
elaborate	O
and	O
complex	O
that	O
involve	O
considerable	O
amounts	O
of	O
compilation	B-Language
time	O
.	O
</s>
<s>
Accordingly	O
,	O
compilers	B-Language
often	O
provide	O
options	O
to	O
their	O
control	O
command	O
or	O
procedure	O
to	O
allow	O
the	O
compiler	B-Language
user	O
to	O
choose	O
how	O
much	O
optimization	O
to	O
request	O
;	O
for	O
instance	O
,	O
the	O
IBM	O
FORTRAN	O
H	O
compiler	B-Language
allowed	O
the	O
user	O
to	O
specify	O
no	O
optimization	O
,	O
optimization	O
at	O
the	O
registers	B-General_Concept
level	O
only	O
,	O
or	O
full	O
optimization	O
.	O
</s>
<s>
By	O
the	O
2000s	O
,	O
it	O
was	O
common	O
for	O
compilers	B-Language
,	O
such	O
as	O
Clang	B-Application
,	O
to	O
have	O
a	O
number	O
of	O
compiler	B-Language
command	O
options	O
that	O
could	O
affect	O
a	O
variety	O
of	O
optimization	O
choices	O
,	O
starting	O
with	O
the	O
familiar	O
-O2	O
switch	O
.	O
</s>
<s>
These	O
tools	O
take	O
the	O
executable	B-Application
output	O
by	O
an	O
optimizing	B-Application
compiler	I-Application
and	O
optimize	O
it	O
even	O
further	O
.	O
</s>
<s>
Post-pass	O
optimizers	O
usually	O
work	O
on	O
the	O
assembly	B-Language
language	I-Language
or	O
machine	B-Language
code	I-Language
level	O
(	O
in	O
contrast	O
with	O
compilers	B-Language
that	O
optimize	O
intermediate	B-Application
representations	I-Application
of	O
programs	O
)	O
.	O
</s>
<s>
One	O
such	O
example	O
is	O
the	O
Portable	B-Application
C	I-Application
Compiler	I-Application
(	O
pcc	O
)	O
of	O
the	O
1980s	O
,	O
which	O
had	O
an	O
optional	O
pass	O
that	O
would	O
perform	O
post-optimizations	O
on	O
the	O
generated	O
assembly	B-Language
code	I-Language
.	O
</s>
<s>
Another	O
consideration	O
is	O
that	O
optimization	O
algorithms	O
are	O
complicated	O
and	O
,	O
especially	O
when	O
being	O
used	O
to	O
compile	B-Language
large	O
,	O
complex	O
programming	O
languages	O
,	O
can	O
contain	O
bugs	O
that	O
introduce	O
errors	O
in	O
the	O
generated	O
code	O
or	O
cause	O
internal	O
errors	O
during	O
compilation	B-Language
.	O
</s>
<s>
Compiler	B-Language
errors	O
of	O
any	O
kind	O
can	O
be	O
disconcerting	O
to	O
the	O
user	O
,	O
but	O
especially	O
so	O
in	O
this	O
case	O
,	O
since	O
it	O
may	O
not	O
be	O
clear	O
that	O
the	O
optimization	O
logic	O
is	O
at	O
fault	O
.	O
</s>
<s>
In	O
the	O
case	O
of	O
internal	O
errors	O
,	O
the	O
problem	O
can	O
be	O
partially	O
ameliorated	O
by	O
a	O
"	O
fail-safe	O
"	O
programming	O
technique	O
in	O
which	O
the	O
optimization	O
logic	O
in	O
the	O
compiler	B-Language
is	O
coded	O
such	O
that	O
a	O
failure	O
is	O
trapped	O
,	O
a	O
warning	O
message	O
issued	O
,	O
and	O
the	O
rest	O
of	O
the	O
compilation	B-Language
proceeds	O
to	O
successful	O
completion	O
.	O
</s>
<s>
Early	O
compilers	B-Language
of	O
the	O
1960s	O
were	O
often	O
primarily	O
concerned	O
with	O
simply	O
compiling	B-Language
code	O
correctly	O
or	O
efficiently	O
,	O
such	O
that	O
compile	B-Language
times	O
were	O
a	O
major	O
concern	O
.	O
</s>
<s>
One	O
notable	O
early	O
optimizing	B-Application
compiler	I-Application
was	O
the	O
IBM	O
FORTRAN	O
H	O
compiler	B-Language
of	O
the	O
late	O
1960s	O
.	O
</s>
<s>
Another	O
of	O
the	O
earliest	O
and	O
important	O
optimizing	B-Application
compilers	I-Application
,	O
that	O
pioneered	O
several	O
advanced	O
techniques	O
,	O
was	O
that	O
for	O
BLISS	B-Language
(	O
1970	O
)	O
,	O
which	O
was	O
described	O
in	O
The	O
Design	O
of	O
an	O
Optimizing	B-Application
Compiler	I-Application
(	O
1975	O
)	O
.	O
</s>
<s>
By	O
the	O
late	O
1980s	O
,	O
optimizing	B-Application
compilers	I-Application
were	O
sufficiently	O
effective	O
that	O
programming	O
in	O
assembly	B-Language
language	I-Language
declined	O
.	O
</s>
<s>
This	O
co-evolved	O
with	O
the	O
development	O
of	O
RISC	B-Architecture
chips	O
and	O
advanced	O
processor	O
features	O
such	O
as	O
instruction	O
scheduling	O
and	O
speculative	O
execution	O
,	O
which	O
were	O
designed	O
to	O
be	O
targeted	O
by	O
optimizing	B-Application
compilers	I-Application
rather	O
than	O
by	O
human-written	O
assembly	B-Language
code	I-Language
.	O
</s>
