This is the mail archive of the gcc@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]

Re: C++ Garbage Collecter


> Finally, I'm curious to know how aggressive gcc can be with these
> sorts of optimizations.  I can imagine that in some bizarre situation
> it is useful to transform the last pointer to an object, and then
> later to transform it back in order to pass it as the `this' parameter
> to a method call.  This would make the problem more likely to be seen
> in practice.

Well, regmove also makes such transformations.  It's quite successful
for the SH port in lowering instruction counts and register pressure.
As to how much of the affected registers come from malloc, that's up to
experiments.
You could make a malloc package that can tell you if any given pointer
is from malloc, and then make loop.c and regmove.c insert some instrumentation
code to check if any pointer manipulation has been done on a pointer to
malloced memory.


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