This is the mail archive of the 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: ping: back end reinitialization hooks to support mixed mips16/nomips16 compilation in same file

Ian Lance Taylor wrote:
Richard Sandiford <> writes:

From this point of view, I disagree that it's a clean-up as things stand.
It seems to muddy the waters in some ways.

Unfortunately I have to agree with this. Sandra identified the problem in her original post: we have too much global state, and too many places which assume that data structures don't change during the compilation. A function like backend_reinit which is called from the backend looks like trouble to me.

Short of the ideal of encapsulating the global info in a structure, we
need a single function which initializes everything based on the
current target state.  That function should be called at compiler
startup, and it may be called by the backend when appropriate.  I
think that a _reinit function which is not called at startup is simply
going to rot over time.

I think this is more or less what Richard is suggesting as well.

OK, thanks all, for the feedback. I think I've got a better idea now of what needs to be done with this patch to turn it into a feature instead of a bug. :-)


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