On 09/16/2016 03:27 PM, David Malcolm wrote:
We should also twiddle how we represent registers in the dumps.
Identifying hard regs by name (so we can map back to a hard reg if
hard regs change), identifying pseudos by number that isn't affected
the hard register set changes ie, p0, p1, p2, p3 where the number is
REGNO (x) - FIRST_PSEUDO_REGISTER. identifying the virtual registers,

Good idea.

I don't know if you saw this yet, but the patch has logic from
renumbering pseudos on load (see class regno_remapper), but dumping
them as p0, p1 etc and reloading them as such seems much easier for
And just an FYI, I think we should do this unconditionally in our dumps.

The key being rather than put a ton of smarts/hacks in a reader, we
should work to have the RTL writer give us something more useful.
may mean simple changes to the output, or some conditional changes
not emitting the INSN_CODE or its name).

That would make the reader a lot less grim; it has a lot of warts for
dealing with all the special cases in the current output format.
That's the idea.

But maybe it is useful to be able to deal with the current output
format.  For example, I was able to look at PR 71779 and find some
fragmentary RTL dumps there (comment #2) and use them.  I *did* need to
edit them a little, so maybe it's OK to require a little editing
(especially with older dumps... to what extent has the format changed
over the years?)
It's changed, but not in radical ways.

I think the case we want to cater to is dumping something from the current compiler rather than picking up some crusty RTL and creating a testcase from that. By "current" I explicitly want the ability to refine the output to make the reader easier to implement.


Reply via email to