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: [patch][plugin] Invoke FINISH_UNIT callbacks earlier


On Sat, Jul 11, 2009 at 11:12 PM, Olatunji Ruwase<tjruwase@google.com> wrote:
> Plugins and callbacks are documented in
> http://gcc.gnu.org/onlinedocs/gccint/Plugins.html#Plugins
>
> Given that plugin support is still being fleshed out, I do not know
> exactly where FINISH_UNIT
> should happen, but the explanation below argues for why the new
> location is more correct than the
> current one.
>
> FINISH_UNIT callbacks perform translation unit (global) level post
> processing and thus should be
> invoked right after the compiler has processed a translation unit.
> Currently it is invoked too late,
> after some data structures needed for compilation have been freed.
> As demonstrated by the attached testcase, it is currently not possible
> for a plugin to create
> new functions in a FINISH_UNIT callback. A mudflap plugin for example
> needs this feature
> to create its initialization function __mf_init ().

I see.  The patch is ok.

Thanks,
Richard.

> Thanks,
> tunji
>
> On Sat, Jul 11, 2009 at 9:58 AM, Richard
> Guenther<richard.guenther@gmail.com> wrote:
>> On Sat, Jul 11, 2009 at 6:37 PM, Olatunji Ruwase<tjruwase@google.com> wrote:
>>> Ping.
>>
>> Do we have documentation on what plugin callbacks are available
>> and are they actually specified somehow? ?Thus, when exactly
>> is FINISH_UNIT supposed to happen, and why is this the more correct
>> place?
>>
>> Thus, there should be a plugins section in the internals manual. ?Is there?
>>
>> Thanks,
>> Richard.
>>
>>> On Mon, Jul 6, 2009 at 5:20 PM, Olatunji Ruwase<tjruwase@google.com> wrote:
>>>> Updated Changelog as suggested.
>>>>
>>>> Thanks
>>>>
>>>> tunji
>>>>
>>>> On Mon, Jul 6, 2009 at 5:13 PM, Olatunji Ruwase<tjruwase@google.com> wrote:
>>>>> On Mon, Jul 6, 2009 at 5:02 PM, Diego Novillo<dnovillo@google.com> wrote:
>>>>>> 2009/7/2 Olatunji Ruwase <tjruwase@google.com>:
>>>>>>
>>>>>>> 2009-07-02 ?Olatunji Ruwase ?<tjruwase@google.com>
>>>>>>>
>>>>>>> ? ? ? * toplev.c: Invoke FINISH_UNIT callbacks earlier, before
>>>>>>> ? ? ? useful structures are destroyed e.g by finalize.
>>>>>>
>>>>>> You just need to state what the patch does (yes, it's kind of
>>>>>> silly). ?Just mention ?'Invoke FINISH_UNIT callbacks before
>>>>>> call to finalize().'
>>>>>
>>>>> Will do.
>>>>>>
>>>>>>>
>>>>>>> 2009-07-02 ?Olatunji Ruwase ?<tjruwase@google.com>
>>>>>>>
>>>>>>> ? ? ? * gcc.dg/plugin/finish_unit_plugin.c: New test.
>>>>>>> ? ? ? * gcc.dg/plugin/finish_unit-test-1.c: New test.
>>>>>>> ? ? ? * gcc.dg/plugin/plugin.exp: Added finish_unit_plugin.c test.
>>>>>>
>>>>>> OK otherwise.
>>>>>>
>>>>>
>>>>> Thanks
>>>>>
>>>>> tunji
>>>>>>
>>>>>> Diego.
>>>>>>
>>>>>
>>>>
>>>
>>
>


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