are they examples showing how to properly have the entry block define the frame pointer and return address so that it is enough to check df_regs_ever_live_p with no need to check respectively frame_pointer_needed and crtl->profile ? On Fri, Apr 5, 2019 at 10:12 PM Segher Boessenkool <segher@xxxxxxxxxxxxxxxxxxx> wrote: > > On Fri, Apr 05, 2019 at 09:25:08PM -0500, William Tambe wrote: > > What is the reason that GCC does not always automatically include the > > frame-pointer and return-address registers in df_regs_ever_live_p such > > that it is necessary to check respectively frame_pointer_needed and > > crtl->profile ? ie: > > https://github.com/gcc-mirror/gcc/blob/gcc-8_3_0-release/gcc/config/fr30/fr30.c#L145 > > The code that actually sets up the frame pointer or return address is not > yet necessarily part of the rtl stream where these checks are used. The > prologue code is inserted in the pro_and_epilogue pass, which runs a bit > _after_ reload (or LRA, in the more modern world). So DF does not see > those insns yet, because they simply do not exist yet ;-) > > The target can make sure the entry block defines these regs, but it sounds > like fr30 did not do that. > > > Segher