IRA conflict graph, multiple alternatives and commutative operands
Bernd Schmidt
bernds@codesourcery.com
Thu Mar 18 22:35:00 GMT 2010
On 03/08/2010 04:39 PM, Jie Zhang wrote:
> I'm looking at PR 42258. I have a question on IRA conflict graph and multiple alternatives.
> (define_insn "*thumb_mulsi3"
> [(set (match_operand:SI 0 "register_operand" "=&l,&l,&l")
> (mult:SI (match_operand:SI 1 "register_operand" "%l,*h,0")
> (match_operand:SI 2 "register_operand" "l,l,l")))]
> ...)
>
> This conflict graph seems like a merge of conflict graphs of the three
> alternatives. Ideally for the first and second alternatives, we should have
[...]
As stated in the PR, this was introduced by the fix for 22072.
One way of solving this is to ensure we don't record conflicts between
earlyclobber outputs and inputs that may match these outputs, as done in
the patch below. This allows the register allocator more freedom, and
if this would be the only conflict between the two registers, reload
should be capable of dealing with the problem if we make an invalid insn.
Vlad, what do you think of this approach?
Bernd
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ira-42258.diff
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20100318/e50a2f03/attachment.ksh>
More information about the Gcc-patches
mailing list