Richard Henderson <richard.hender...@linaro.org> writes:
> We can easily register allocate the entire extended basic block > (in this case, the set of blocks connected by fallthru), simply > by not discarding the register state at the branch. > > This does not help blocks starting with a label, as they are > reached via a taken branch, and that would require saving the > complete register state at the branch. > > Signed-off-by: Richard Henderson <richard.hender...@linaro.org> > --- > include/tcg/tcg-opc.h | 7 +++--- > include/tcg/tcg.h | 4 +++- > tcg/tcg.c | 55 +++++++++++++++++++++++++++++++++++++++++-- > 3 files changed, 60 insertions(+), 6 deletions(-) > <snip> > > +/* > + * liveness analysis: conditional branch: all temps are dead, > + * globals and local temps should be synced. > + */ > +static void la_bb_sync(TCGContext *s, int ng, int nt) > +{ > + la_global_sync(s, ng); > + > + for (int i = ng; i < nt; ++i) { > + if (s->temps[i].temp_local) { > + int state = s->temps[i].state; > + s->temps[i].state = state | TS_MEM; > + if (state != TS_DEAD) { > + continue; It took me a few scans of this function before I realised the continue was to avoid the la_reset_pref at the end. Not sure if it can be made any neater though: Reviewed-by: Alex Bennée <alex.ben...@linaro.org> -- Alex Bennée