cfgrtl: Fix up -g vs. -g0 code generation -flto differences in fixup_reorder_chain [PR104589]
This is similar to PR104237 and similarly to that, no testcase included for the testsuite, as we don't have a framework to compile/link with -g -flto and -g0 -flto and compare -fdump-final-insns= results from the lto1 compilations. With -flto, whether two location_t compare equal or not and just express the same location is a lottery. 2022-03-02 Jakub Jelinek <jakub@redhat.com> PR rtl-optimization/104589 * cfgrtl.cc (fixup_reorder_chain): Use loc_equal instead of direct INSN_LOCATION comparison with goto_locus.
This commit is contained in:
parent
5f2e72db8c
commit
2e1b00367a
@ -4090,7 +4090,7 @@ fixup_reorder_chain (void)
|
||||
&& (!NONDEBUG_INSN_P (insn) || !INSN_HAS_LOCATION (insn)))
|
||||
insn = PREV_INSN (insn);
|
||||
if (insn != end
|
||||
&& INSN_LOCATION (insn) == e->goto_locus)
|
||||
&& loc_equal (INSN_LOCATION (insn), e->goto_locus))
|
||||
continue;
|
||||
if (simplejump_p (BB_END (e->src))
|
||||
&& !INSN_HAS_LOCATION (BB_END (e->src)))
|
||||
@ -4112,7 +4112,7 @@ fixup_reorder_chain (void)
|
||||
while (insn != end && !NONDEBUG_INSN_P (insn))
|
||||
insn = NEXT_INSN (insn);
|
||||
if (insn != end && INSN_HAS_LOCATION (insn)
|
||||
&& INSN_LOCATION (insn) == e->goto_locus)
|
||||
&& loc_equal (INSN_LOCATION (insn), e->goto_locus))
|
||||
continue;
|
||||
}
|
||||
nb = split_edge (e);
|
||||
|
Loading…
Reference in New Issue
Block a user