On 09/25/2015 11:13 AM, Abe Skolnik wrote:
From: Jeff Law <l...@redhat.com>

Sent: Friday, September 25, 2015 11:09 AM


I'd be surprised if we had DEBUG_INSNs as the first insn in a block
(before the note), but it can't hurt to verify.  I believe cfgrtl checks
for proper location of the block note.  But maybe I'm mis-remembering.
It might not be a bad idea to run the verification code immediately
after your transformation (for testing purposes only).

Thanks for the advice.


By "run the verification code", did you mean:

   * call some code whereby "cfgrtl checks for proper location of the block 
note"?

   * re-use some other already-existing-in-GCC code?

   * write some new verification code of my own?
There's several routines for verfication of the CFG and various RTL artifacts in cfgrtl.c. I'm not offhand sure of the main entry point for those routines. I believe they're typically run by the pass manager.




By "after your transformation", did you mean:

   * just before my code does "goto success;", which jumps to a point
     in "noce_process_if_block" that was already there and is shared
     between several different RTL-level if conversions?
At whatever point you've finished your transformation of a single IF-THEN-ELSE block. That way if something was wrong, you'll know precisely which IF-THEN-ELSE block is getting messed up.

Since it's just for debugging purposes, you can afford the time to do the checking this often. Obviously that wouldn't be part of the official patch.


   * well after the relevant "success:" but before returning?

   * both of the preceding?

   * "other"?
WHenver you've totally completed transforming an IF-THEN-ELSE block, but before any other transformations are started.

jeff


Reply via email to