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

Jeff Law
Thu Sep 24 06:29:00 GMT 2015

On 09/23/2015 06:11 PM, Abe wrote:
> The patch can pass the bootstrap stage2-to-stage3 comparison [same
> platform] *_if_* I prevent the "bootstrap-debug" value for
> BUILD_CONFIG from being automatically chosen, e.g. via
> "--with-build-config=bootstrap=time" during configuration. With the
> default "BUILD_CONFIG=bootstrap-debug", it fails at the comparison
> stage.
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.


More information about the Gcc-patches mailing list