Compact regsiter allocation
Ian Lance Taylor
iant@google.com
Fri May 15 21:00:00 GMT 2009
Jamie Prescott <jpresss@yahoo.com> writes:
> The target reorg is great, but it had two problems for me. One is that it was issued after the
> prologue/epilogue,
Oh yeah, you probably do want to introduce a pass before
prologue/epilogue generation but after register allocation. There isn't
any mechanism for that at present, although it's easy to do in your own
sources--just add something to init_optimization_passes in passes.c.
> This seems to be working fine, but my biggest doubt is that way I dig into the single instructions to
> find REG RTXs to remap.
> I looked around and I ended up with the code below, partially stolen from print_rtx().
> Is there a public/non-hackish API to enum all the RTXs contained inside an instruction?
Use for_each_rtx to walk through an RTX. There are lots of handy
functions like that in rtlanal.c.
Ian
More information about the Gcc
mailing list