Unreviewed patch: PATCH: [darwin] Adding branch prediction bits for bdxx instructions

Caroline Tice ctice@apple.com
Sat Feb 21 13:45:00 GMT 2004


I reduced the number of alternatives based on a misunderstanding of 
what was required for
reducing the number of branches in the if statement.  I have now 
restored the alternatives to
their original state.  Below is the latest version of the patch (with 
-u).  I'm in the process of
re-compiling/bootstrapping/re-testing the patch.  Assuming it passes 
the tests, is this okay to
commit?

-- Caroline Tice
ctice@apple.com

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: gcc5-branch-pred-u.txt
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20040221/001aaa76/attachment.txt>
-------------- next part --------------



On Feb 11, 2004, at 10:21 AM, David Edelsohn wrote:

>>>>>> Caroline Tice writes:
>
> Caroline> Yes,  I am combining  two alternatives, one which will use 
> bdn
> Caroline> or bdz, and the other which will use
> Caroline> bdnz, into one alternative that calls a function.  The 
> function then
> Caroline> puts out the correct (bdn, bdz, or bdnz)
> Caroline> instruction(s).
>
> 	I am not asking about merging patterns, I am asking about the
> number of alternatives in the patterns, for example:
>
>  (define_insn "*ctrsi_internal1"
>    [(set (pc)
> -       (if_then_else (ne (match_operand:SI 1 "register_operand" 
> "c,*r,*r,*r")
> +       (if_then_else (ne (match_operand:SI 1 "register_operand" 
> "c,*r,*r")
>                           (const_int 1))
>                       (label_ref (match_operand 0 "" ""))
>                       (pc)))
> -   (set (match_operand:SI 2 "register_operand" "=1,*r,m,*q*c*l")
> +   (set (match_operand:SI 2 "register_operand" "=1,*r,m*q*c*l")
>         (plus:SI (match_dup 1)
>                  (const_int -1)))
> -   (clobber (match_scratch:CC 3 "=X,&x,&x,&x"))
> -   (clobber (match_scratch:SI 4 "=X,X,&r,r"))]
> +   (clobber (match_scratch:CC 3 "=X,&x,&x"))
> +   (clobber (match_scratch:SI 4 "=X,X,r"))]
>
> Note that you decreased the number of register constraint alternatives
> from 4 to 3, merging the "m" case back into the "*q*c*l" case for
> match_operand 2 and removing the extra early clobber from 
> match_scratch 4.
>
> David
>


More information about the Gcc-patches mailing list