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: [lto][patch] Clear DECL_CONTEXT of PARM_DECL


How about exploring the idea you had about forcing DECL_CONTEXT?
IIUC, your suggestion would:

1- Keep DECL_CONTEXT unmodified.
2- Stop from writing it to disk
3- On read-in, we would simply force DECL_CONTEXT to the function that
we are currently reconstructing.

That could work, though you would need to write a marker that
identifies local variables, of course.

In fact, we could even do this in the changes to
pass_ipa_free_lang_specifics that I'm about to post.  Since we have
now switched to traversing the cgraph and varpool nodes, we could make
this DECL_CONTEXT change during that traversal.  This way, the writing
and reading process would not need to change at all.


Diego.


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