On 11/09/2015 09:58 PM, Trevor Saunders wrote:
With the exception of the emit-rtl.c hunk I think I've correctly convinced myself this macro is just an optimization.
I also looked at that one and initially thought that it can simply go away, but the earlier test for FRAME_POINTER_REGNUM also has some extra reload_completed etc. conditions.
So I think this: ! if (!HARD_FRAME_POINTER_IS_FRAME_POINTER && regno == HARD_FRAME_POINTER_REGNUM && (!reload_completed || frame_pointer_needed)) return hard_frame_pointer_rtx; -#if !HARD_FRAME_POINTER_IS_ARG_POINTER if (FRAME_POINTER_REGNUM != ARG_POINTER_REGNUM && regno == ARG_POINTER_REGNUM) return arg_pointer_rtx; -#endif should become ! if (HARD_FRAME_POINTER_REGNUM != FRAME_POINTER_REGNUM && regno == HARD_FRAME_POINTER_REGNUM && (!reload_completed || frame_pointer_needed)) return hard_frame_pointer_rtx; if (FRAME_POINTER_REGNUM != ARG_POINTER_REGNUM + && HARD_FRAME_POINTER_REGNUM != ARG_POINTER_REGNUM && regno == ARG_POINTER_REGNUM) return arg_pointer_rtx; #endif and then it should be possible to eliminate the two X_IS_Y macros. Bernd