On 12/14/2021 3:27 PM, Jakub Jelinek wrote:
On Tue, Dec 14, 2021 at 03:05:37PM -0700, Jeff Law wrote:
2021-12-14  Jakub Jelinek  <ja...@redhat.com>

        PR debug/103619
        * dwarf2cfi.c (dwf_cfa_reg): Remove gcc_assert.
        (operator==, operator!=): New overloaded operators.
        (dwarf2out_frame_debug_adjust_cfa, dwarf2out_frame_debug_cfa_offset,
        dwarf2out_frame_debug_expr): Compare vars with cfa_reg type directly
        with REG rtxes rather than with dwf_cfa_reg results on those REGs.
        (create_cie_data): Use stack_pointer_rtx instead of
        gen_rtx_REG (Pmode, STACK_POINTER_REGNUM).
        (execute_dwarf2_frame): Use hard_frame_pointer_rtx instead of
        gen_rtx_REG (Pmode, HARD_FRAME_POINTER_REGNUM).
So if someone is unfamiliar with the underlying issues here and needs to
twiddle dwarf2cfi, how are they supposed to know if they should compare
directly or use dwf_cfa_reg?
Comparison without dwf_cfa_reg should be used whenever possible, because
for registers which are never CFA related that won't call
targetm.dwarf_register_span uselessly.
So it's easy enough to articulate.   Is there anywhere you could put a comment to that effect where it's likely to be seen in that file?

OK with that change.

Jeff

Reply via email to