Re: Compiler Loop Unswitching




"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


.



Relevant Pages

  • Re: Compiler Loop Unswitching
    ... compare is known at compile time. ... It halves the pipe line flushes ... Could you explain what you mean with "first compare"? ...
    (comp.programming)
  • Re: Its Jihad.... not terrorism
    ... The boogey man!!!!! ... contrast and compare with how many have died since then from allergic ... takes too many flushes. ... your beloved Clinton was the first that tried to pass the ...
    (rec.martial-arts)
  • Re: Help on a pipe decision
    ... Each time I arrive at the CORPS Pipe Exposition in ... I can't compare with Cavicchis, ...
    (alt.smokers.pipes)
  • Re: JIRSA PIPES
    ... I have never owned a JIRSA pipe so I was wondering how they compare ... if JIRSA had a "fire sale" to gain some market share here in the US? ... it has had hh vintage syrian ...
    (alt.smokers.pipes)
  • How Many Pipe Smokers?
    ... are pipe smokers,and how many total pipe smokers that adds up to.I ... wonder also how we compare to other countries as to the number pipe ...
    (alt.smokers.pipes)