multiplies by powers of two
Matthew Fluet
mfluet@intertrust.com
Fri, 13 Jul 2001 11:43:31 -0700 (PDT)
> > Did you end up putting in the tweak to notice that the flags were set by the
> > last operation? I doubt that it is a huge win, but ...
>
> I just added it. It hasn't triggered many on the few quick programs I ran
> it through, but I'll see how it does on a self compile. It's not
> triggering any false-positives, so it shouldn't hurt performance to leave
> it in.
On a self compile, I did 63 transformations with 182 matches (i.e., there
were 119 false positives). Pretty trivial.
The false positives correspond to the way I'm doing the matching. There
is a regexp-like pattern matcher (essentially uses predicates on single
instructions and looks for patterns of instructions that satisfy the right
predicates in the right order), which found 182 matches. Then I need to
do some additional tests on the whole match (in this case, that the
destination of the arithmetic/logical op is the same as the srcs to the
test instruction). I'm kind of suprised that there are that many false
positives; would seem to correspond to computing the tested value and
doing some intermediate computation before using the test and branching.