On 06/03/2014 01:15 PM, Kai Tietz wrote:
> ----- Original Message -----
>> On 06/03/2014 12:56 PM, Kai Tietz wrote:
>>> +(define_insn "*sibcall_intern"
>>> +  [(call (unspec [(mem:QI (match_operand:W 0 "memory_operand"))]
>>> UNSPEC_PEEPSIB)
>>> +    (match_operand 1))]
>>> +  ""
>>> +  "* SIBLING_CALL_P (insn) = 1; return ix86_output_call_insn (insn,
>>> operands[0]);"
>>> +  [(set_attr "type" "call")])
>>
>> Why would this be hard to do when first emitting it?
> 
> To set this flag on the peephole causes some hazard with
> unknown-instruction,
as the memory isn't part of the existing SIBLING_CALL_P (insn) rules. And of
course we don't want to allow general memory-operand for sibling-calls, so it
is hard (and useless) to set it in peephole. Additionally it would mean to
replace insn-generation generation by hand-written block to get access to the
insn (code generation adds added { ... } block to the beginning of the
peephole-generation routine).


I think we need to get the SIBLING_CALL_P flag transferred immediately.
Otherwise we risk incorrect data flow analysis elsewhere.

We don't necessarily have to open-code this.  It looks like peep2_attempt
copies over some of the extra bits for calls, but not all of them.  Compare
this to what we have in try_split.


r~

Reply via email to