[PR67891] drop is_gimple_reg test from set_parm_rtl
Alexandre Oliva
aoliva@redhat.com
Tue Nov 3 01:11:00 GMT 2015
On Oct 14, 2015, Richard Biener <richard.guenther@gmail.com> wrote:
> On Wed, Oct 14, 2015 at 5:25 AM, Alexandre Oliva <aoliva@redhat.com> wrote:
>> On Oct 12, 2015, Richard Biener <richard.guenther@gmail.com> wrote:
>>
>>> On Sat, Oct 10, 2015 at 3:16 PM, Alexandre Oliva <aoliva@redhat.com> wrote:
>>>> On Oct 9, 2015, Richard Biener <richard.guenther@gmail.com> wrote:
>>>>
>>>>> Ok. Note that I think emit_block_move shouldn't mess with the addressable flag.
>>>>
>>>> I have successfully tested a patch that stops it from doing so,
>>>> reverting https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49429#c11 but
>>>> according to bugs 49429 and 49454, it looks like removing it would mess
>>>> with escape analysis introduced in r175063 for bug 44194. The thread
>>>> that introduces the mark_addressable calls suggests some discomfort with
>>>> this solution, and even a suggestion that the markings should be
>>>> deferred past the end of expand, but in the end there was agreement to
>>>> go with it. https://gcc.gnu.org/ml/gcc-patches/2011-06/msg01746.html
>>
>>> Aww, indeed. Of course the issue is that we don't track pointers to the
>>> stack introduced during RTL properly.
>>
>>> Thanks for checking. Might want to add a comment before that
>>> addressable setting now that you've done the archeology.
>>
>> I decided to give the following approach a try instead. The following
>> patch was regstrapped on x86_64-linux-gnu and i686-linux-gnu.
>> Ok to install?
> It looks ok to me but lacks a comment in mark_addressable_1 why we
> do this queueing when currently expanding to RTL.
>> +/* Mark X as addressable or queue it up if called during expand. */
>> +
>> +static void
>> +mark_addressable_1 (tree x)
How about this:
/* Mark X as addressable or queue it up if called during expand. We
don't want to apply it immediately during expand because decls are
made addressable at that point due to RTL-only concerns, such as
uses of memcpy for block moves, and TREE_ADDRESSABLE changes
is_gimple_reg, which might make it seem like a variable that used
to be a gimple_reg shouldn't have been an SSA name. So we queue up
this flag setting and only apply it when we're done with GIMPLE and
only RTL issues matter. */
--
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 Brasil GNU Toolchain Engineer
More information about the Gcc-patches
mailing list