This is the mail archive of the 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: PR/32004, tree-ssa caused in/out asm constraints to often need reloads

Paolo Bonzini wrote:
> The cause and solution of the problem are well explained in the PR trail
> and in the comments to the code.
> Bootstrapped/regtested i686-pc-linux-gnu with no new failure and fixing
> pr21291.c, ok for 4.2/4.3?

I have a couple of minor comments:

+	  if (GET_CODE (pat) == PARALLEL
+	      && GET_CODE (XVECEXP (pat, 0, 0)) == SET
+	      && GET_CODE (SET_SRC (XVECEXP (pat, 0, 0))) == ASM_OPERANDS)
+	    match_asm_constraints_1 (insn,
+				     &XVECEXP (pat, 0, 0), XVECLEN (pat, 0));
+	  else if (GET_CODE (pat) == SET
+	           && GET_CODE (SET_SRC (pat)) == ASM_OPERANDS)
+	    match_asm_constraints_1 (insn, &pat, 1);

could be more tidily expressed as:

 if (GET_CODE (pat) == PARALLEL)
    pat = XVECEXP (pat, 0, 0);
 if (GET_CODE (pat) == SET
     && ...)


+      int match;
+      match = strtoul (constraint, &end, 10);

it seems like it would be better just to declare "match" to be "unsigned

Does your patch handle matching constraints given by "[NAME]"?

Other than that, it looks good.

Mark Mitchell
(650) 331-3385 x713

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