This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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

Attachment: gcc5-branch-pred-u.txt
Description: Text document




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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]