This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PR/32004, tree-ssa caused in/out asm constraints to often need reloads
- From: Mark Mitchell <mark at codesourcery dot com>
- To: bonzini at gnu dot org
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 05 Jul 2007 11:24:03 -0700
- Subject: Re: PR/32004, tree-ssa caused in/out asm constraints to often need reloads
- References: <468CC82F.2060702@lu.unisi.ch>
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
&& ...)
...
Also:
+ int match;
+ match = strtoul (constraint, &end, 10);
it seems like it would be better just to declare "match" to be "unsigned
long".
Does your patch handle matching constraints given by "[NAME]"?
Other than that, it looks good.
--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713