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: Ping : [PATCH] [gcc, combine] PR46164: Don't combine the insns if a volatile register is contained.


Hi Terry,

I still think this is stage1 material.

> +  /* Don't combine if dest contains a user specified register and i3 contains
> +     ASM_OPERANDS, because the user specified register (same with dest) in i3
> +     would be replaced by the src of insn which might be different with
> +     the user's expectation.  */

"Do not eliminate a register asm in an asm input" or similar?  Text
explaining why REG_USERVAR_P && HARD_REGISTER_P works here would be
good to have, too.

> +  if (REG_P (dest) && REG_USERVAR_P (dest) && HARD_REGISTER_P (dest)
> +      && (GET_CODE (PATTERN (i3)) == SET
> +	  && GET_CODE (SET_SRC (PATTERN (i3))) == ASM_OPERANDS))
> +    return 0;

That works only for asms with exactly one output.  You want
extract_asm_operands.


Segher


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