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


[Resending with the correct Mike's address, sorry for the spam]

> So what's the plan for the case where you need to change the lifetime of
> an object?

Copying it. Frankly at the moment I don't how much trouble does deep
copying from scratch to function entails, as mentioned in your other
e-mail. ATM I am working at separating permanent from function. If it
turns out to be unsurmountable, then, well, lesson learned.

> What's the plan for building some kind of consistency
> checking to ensure that we aren't referencing dangling pointers.

I haven't thought them out in detail at this moment, but I had some
ideas, very close to what Steven suggested: poisoning RTL obstacks
instead of freeing/reusing. Walking existing GC memory at RTL function
memory freeing time to see that no pointers point to it. The latter is
virtually free even.

> I ask these questions because they were a serious source of problems in
> the past and any significant revamping of memory management needs to
> have a reasonable story for how to deal with them, else we're taking a
> rather significant step backwards.

I plan to propose merging the branch once such concerns will be
adequately addressed. Personally I believe that it is possible to
address them. In the case it is impossible to address them, I will
propose merging very lite version of the branch that changes RTL
allocation interface, keeps GC behind it, and leaves the rest for
presumably brighter future. Hopefully this will not be the case.

Regarding PCH: so far whenever I touch it, frankly I hate it. In the
current context: the RTL output there was early-generated RTL which
IMHO itself is a sign of a poor IL separation in GCC. So in that
respect I believe my work is a step in a right direction, even if
painful.

Thanks for your feedback,
--
Laurynas


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