Re: Compiler Loop Unswitching
- From: "Bartc" <bc@xxxxxxxxxx>
- Date: Fri, 29 Feb 2008 16:02:04 GMT
"Tim Frink" <plfriko@xxxxxxxx> wrote in message
news:pan.2008.02.29.15.21.34.33843@xxxxxxxxxxx
Based on our metrics the single most important loop optimization
on application code is moving the test to the bottom when the first
compare is known at compile time. It halves the pipe line flushes
and is almost trivial to implement.
Could you explain what you mean with "first compare"? Maybe you could
provide a small code example?
Perhaps he means something like the following. Although for 'first compare'
I'm guessing he means the first test will be true (not important in the
snippet below because it jumps to the first test), so maybe the Jump %2 can
be eliminated.
while a do
b:=c
end
00019 Jump %2
00021 %3:
00023 Pushm c
00025 Popm b
00027 %2:
00029 Pushm a
00031 Jumpt %3
00033 %1:
--
Bart
.
- References:
- Compiler Loop Unswitching
- From: Tim Frink
- Re: Compiler Loop Unswitching
- From: Walter Banks
- Re: Compiler Loop Unswitching
- From: Tim Frink
- Compiler Loop Unswitching
- Prev by Date: data specs
- Next by Date: Re: data specs
- Previous by thread: Re: Compiler Loop Unswitching
- Next by thread: Re: Compiler Loop Unswitching
- Index(es):
Relevant Pages
|