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: [vta, vta4.4, trunk?, 4.4?] avoid modifying locus of expr in place


On Fri, Aug 21, 2009 at 1:28 AM, Alexandre Oliva<aoliva@redhat.com> wrote:
> On Aug 20, 2009, Richard Guenther <richard.guenther@gmail.com> wrote:
>
>> On Thu, Aug 20, 2009 at 9:00 PM, Alexandre Oliva<aoliva@redhat.com> wrote:
>>> On Aug 20, 2009, Richard Guenther <richard.guenther@gmail.com> wrote:
>>>
>>>> On Thu, Aug 20, 2009 at 10:51 AM, Alexandre Oliva<aoliva@redhat.com> wrote:
>>>>> Does this sound like the right approach to fix the problem? ?Is this
>>>>> desirable for trunk or 4.4 branches? ?It doesn't fix any codegen
>>>>> problems in there AFAIK, and there's only one non-expand use of this
>>>>> function, which might get extraneous line number information elsewhere
>>>>> because of this behavior.
>>>
>>>> The correct fix is to rewrite expansion to not re-build generic.
>>>
>>> I can see how this is somewhat related with the problem at hand, but I
>>> don't see how some change at expansion time could make up for an earlier
>>> call of gimple_assign_rhs_to_tree() in tree-affine.c, that would add an
>>> extraneous location to a shared EXPR tree. ?Could you please clue me in?
>
>> tree-affine.c doesn't care about locuses at all. ?That
>> gimpleAssign_rhs_to_tree in the end shouldn't set a locus on the tree.
>
> Aaah, all right, then.
>
>> ATM it only does because of the use in expansion.
>
> So should cfgexpand define a static wrapper that calls a
> non-locus-setting version of gimple_assign_rhs_to_tree, and call that
> instead, and then set the locus *after* unsharing the trees?

Ya, that sounds like a good idea.

Thanks,
Richard.

> --
> Alexandre Oliva, freedom fighter ? ?http://FSFLA.org/~lxoliva/
> You must be the change you wish to see in the world. -- Gandhi
> Be Free! -- http://FSFLA.org/ ? FSF Latin America board member
> Free Software Evangelist ? ? ?Red Hat Brazil Compiler Engineer
>


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