This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PR67891] drop is_gimple_reg test from set_parm_rtl
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: Richard Biener <richard dot guenther at gmail dot com>
- Cc: UroÅ Bizjak <ubizjak at gmail dot com>, Alan Lawrence <alan dot lawrence at arm dot com>, Jeff Law <law at redhat dot com>, James Greenhalgh <James dot Greenhalgh at arm dot com>, "H.J. Lu" <hjl dot tools at gmail dot com>, Segher Boessenkool <segher at kernel dot crashing dot org>, GCC Patches <gcc-patches at gcc dot gnu dot org>, Christophe Lyon <christophe dot lyon at linaro dot org>, David Edelsohn <dje dot gcc at gmail dot com>, Eric Botcazou <ebotcazou at adacore dot com>
- Date: Mon, 02 Nov 2015 23:11:10 -0200
- Subject: Re: [PR67891] drop is_gimple_reg test from set_parm_rtl
- Authentication-results: sourceware.org; auth=none
- References: <orio9cw10j dot fsf at livre dot home> <or4mkmhgc9 dot fsf at livre dot home> <CAMe9rOp=S5fu1N=i7waswCYqJeLBCrySqYdFYkVa7LV04vpQSg at mail dot gmail dot com> <CAMe9rOrq+ZBAg1nZ1twEcPqwBj4j9+XA+SXQJVWWzjfdvidjtw at mail dot gmail dot com> <or1tfkdjhj dot fsf at livre dot home> <20150810082355 dot GA31149 at arm dot com> <55C8BFC3 dot 3030603 at redhat dot com> <CAKQMxzRzMrGtf921vqXCno5uoBN+uzsnJ5wX2Twmvhp1ziAEcA at mail dot gmail dot com> <or37zlpujd dot fsf at livre dot home> <55E72D4C dot 40705 at arm dot com> <orfv2wxygm dot fsf at livre dot home> <55FC3171 dot 7040509 at arm dot com> <ord1x8nblu dot fsf at livre dot home> <CAFiYyc1x2124-YgLmP_Yt+mBgyv_2Yp=O7G4WX9dbYfEs6z=NQ at mail dot gmail dot com> <orsi5k7gde dot fsf_-_ at livre dot home> <oroag87az2 dot fsf_-_ at livre dot home> <CAFiYyc2GvwkNOwpE2xYGHZRPLnQaSWG6MjbiMidDdJyBbRV8XA at mail dot gmail dot com> <orvbae6eyz dot fsf at livre dot home> <CAFiYyc2hGZ_v+-88+wR=wdofeddu1=xXhf9hnpH3UrejOz2faQ at mail dot gmail dot com> <or1tcy3zds dot fsf at livre dot home> <CAFiYyc1rZcnvOSkxVsSZu5gi1ozzzxNvLwA17YmM51DRj2KH=A at mail dot gmail dot com>
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