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: no_new_pseudos

On Jul  4, 2007, Richard Sandiford <> wrote:

> What about the earlier idea of keeping no_new_pseudos and making it
> equivalent to "reload_in_progress || reload_completed", either by being
> a macro or by being a variable?

Actually, how about replacing the three variables with a single
tri-state variable that indicates the progress into reload:

enum { BEFORE_RELOAD = -1, DURING_RELOAD = 0, AFTER_RELOAD = 1 } reload_status;

#define BEFORE_RELOAD_P() (reload_status < DURING_RELOAD)
#define DURING_RELOAD_P() (reload_status == DURING_RELOAD)
#define AFTER_RELOAD_P() (reload_status > DURING_RELOAD)

then no_new_pseudos becomes (!BEFORE_RELOAD_P ()), reload_in_progress
becomes DURING_RELOAD_P () and reload_completed becomes AFTER_RELOAD_P
(), and all conditions are equally simple to evaluate.

And then, if we ever need to distinguish between internal reload
stages, we just extend the enum, adjust the macros and introduce new
ones as needed.

Alexandre Oliva
FSF Latin America Board Member
Red Hat Compiler Engineer   aoliva@{,}
Free Software Evangelist  oliva@{,}

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