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: [patch] replace a bunch of equivalent checks for asm operands with a new function


> Hmm, what do you have in mind for such a situation?
> 
> If extract_asm_operands returns NULL then asm_noperands will return -1.
> 
> If extract_asm_operands returns non-NULL then asm_noperands deep-dives
> the PATTERN of the insn (just like extract_asm_operands) and returns
> >= 0 unless the insn is invalid.

I don't think that we want to replace calls to extract_asm_operands by calls 
to asm_noperands because that will make the compiler slower and less robust on 
invalid inputs.

Why can't we write insn_with_asm_operands_p as

  GET_CODE (body) == ASM_INPUT || extract_asm_operands (body) != NULL

and replace most of the cases with a call to it?

-- 
Eric Botcazou


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