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: [gc-improv] Permanent vs function RTL obstack fix


2011/4/8 Jeff Law <law@redhat.com>:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 04/08/11 07:21, Laurynas Biveinis wrote:
>> 2011/4/8 Steven Bosscher <stevenb.gcc@gmail.com>:
>>>> Â Â Â Â* stmt.c (label_rtx): Allocate RTX in permanent RTL memory.
>>>
>>> That looks strange, labels should be function specific, except
>>> non-local labels. Maybe you can get away with allocating DECL_NONLOCAL
>>> labels on the permanent rtl obstack?
>>
>> That's a good idea, I will try it once things are stable on the branch.
>>
>>> Perhaps a third, per-translation-unit obstack is necessary?
>>
>> Perhaps. After I finish with permanent rtl obstack, I will measure how
>> large it gets and if it's worthwhile to split out
>> per-translation-obstack out of it.
> And then you'll want a per-statement obstack, then per-expression
> obstack, and before you know it, GCC looks much like it did 20 years ago.

It is certainly true that moving away from GC will make some kinds of
bugs possible again, but I hope that not enough to be an unmanageable
concern. The RTL object lifetimes seem to be clear in most of the
instances and so far I am going with only two of them: permanent and
function. After the initial conversion is done, I don't expect much
trouble for any new RTL allocations introduced to be decided which
memory area they belong to.

Adding a third area, e.g. per-TU, of course would complicate this, but
I still believe this is manageable.

--
Laurynas


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