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: [PATCH, ARM, LRA] Fixed bootstrap failure in Thumb mode

On 11/27/2013, 1:20 PM, Jeff Law wrote:
On 11/27/13 10:58, Vladimir Makarov wrote:

The secondary reload macros/hooks define cases where additional
registers are needed to reload certain forms of rtl.  I doubt the use
of LRA completely eliminates the need for secondary reloads.
   When I designed LRA I wanted to remove as many hooks as possible
because I thought insn constraints as major info source are enough.
Unfortunately I did not succeed fully with secondary reload hooks and
macros.  It is still needed for some complicated cases but general rule
to port LRA to a target is to try to switch these hooks off.
I should have remembered some of this. Didn't we discuss this in the context of SECONDARY_MEMORY_NEEDED?

Yes, we discussed it. It is just particually one case. The biggest complication I found with secondary memory is PPC port. Besides this macro, only this port uses a special hook saying what exact stack slot to use for {SD,DD}mode values.

   For example, LRA can generate a move of pseudos of classes for which
hardware has no real insn.  After that looking on the move constraints,
LRA can generate more move insns and additional pseudos to generate
moves (loads or stores if additional pseudos got NO_REGS) which
represent real hardware insns.  In complicated cases when these macros
are still needed, LRA runs into infinite loop of such move generation if
the macros are not used.
So it sounds like LRA reduces the need for the SECONDARY_RELOAD_* hooks/macros, but doesn't totally eliminate them.

So I find myself wondering if/how we can document this in the manual. Vlad, can you take a stab at that.

I'll work on it.

   I might be return to a project to remove necessity of such hooks and
macros for LRA but I am not sure when.  I guess I need to write a small
guidance too how to port LRA.
That would be good as well, but I think most folks doing port work refer more to the GCC internals manual, so we certainly need it updated in addition to any "how to port to LRA" kind of document.
Porting LRA is always unpredictable ride. But I guess I could classify some patterns here. Only it will be not long, it is not clear area even for me.

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