This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: using scratchpads to enhance RTL-level if-conversion: the new patch is almost ready to be prepared for merging to trunk, but not 100% ready yet
- From: Abe <abe_skolnik at yahoo dot com>
- To: Jeff Law <law at redhat dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, Kyrill Tkachov <kyrylo dot tkachov at arm dot com>, Sebastian Pop <sebpop at gmail dot com>
- Date: Thu, 24 Sep 2015 10:19:43 -0500
- Subject: Re: using scratchpads to enhance RTL-level if-conversion: the new patch is almost ready to be prepared for merging to trunk, but not 100% ready yet
- Authentication-results: sourceware.org; auth=none
- References: <56033FC7 dot 5080005 at yahoo dot com> <56039331 dot 7080909 at redhat dot com>
On 9/24/15 1:07 AM, Jeff Law wrote:
So what that means is the presence or absence of debug information is causing a difference in
> the code you generate. That is (of course) bad and indicates a bug of some kind in your code.
I haven't put your code under a debugger or anything like that, but this does jump out:
+ rtx_insn* temp_src_insn = BB_HEAD (then_bb);
+ if (temp_src_insn && NOTE_INSN_BASIC_BLOCK_P (temp_src_insn))
+ temp_src_insn = NEXT_INSN (temp_src_insn); /* skip over a start-of-BB note */
What if BB_HEAD (then_bb) is a DEBUG_INSN with -g enabled, but is a NOTE_INSN_BASIC_BLOCK when -g is not enabled. That could cause
this kind of failure.
Thanks very much! I`m just checking email right before heading out to surgery, so I can`t experiment on changing the above code
right now, but I`ll be sure to do so next week.
After some thinking, I thought of this question: would "-g"/"-g3"/etc. cause a DEBUG_INSN to be present in the RTL as the first insn
in the BB, just before the start-of-BB note? In other words, rather than only checking to see if I should skip copying the first
insn in the BB, would checking {the first insn, and if that`s not a NOTE, then check the second insn} and skipping over whichever
one is the first "hit" for "NOTE" be a safe strategy?
Thanks again!
Regards,
Abe