public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Need info on GIMPLE
@ 2011-05-30  6:09 Abdul Wahid Memon
  2011-05-31  6:37 ` Ian Lance Taylor
  0 siblings, 1 reply; 8+ messages in thread
From: Abdul Wahid Memon @ 2011-05-30  6:09 UTC (permalink / raw)
  To: gcc-help

Hello every one

I am doing some analysis on GIMPLE intermediate representation and I
have some questions.

I need to count the number of labels present in the representation
such as after optimized pass, but
I dont know why I don't encounter label statement in my switch
statement's case clause even though
there are some labels present. I am using iterators over basic blocks
and statement to determine how many
statement are there and which type.

 FOR_EACH_BB(bb)
  {
   for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); gsi_next (&gsi))
      {

	switch(gimple_code(stmt))
	  {
	    case GIMPLE_NOP:
	    printf("NOP : ");
	    break;
	  case GIMPLE_COND:
	    printf("COND_STMT / ");
	    break;
	  case GIMPLE_LABEL:
	    printf("LABEL / ");
	    break;
        }
    }
}

Other cases are being matched such as GIMPLE_COND but not
GIMPLE_LABEL. Is there anything I am missing.

Regards

Abdul

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-06-07 21:20 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-30  6:09 Need info on GIMPLE Abdul Wahid Memon
2011-05-31  6:37 ` Ian Lance Taylor
2011-06-07 18:40   ` Abdul Wahid Memon
2011-06-07 19:38     ` Ian Lance Taylor
     [not found]       ` <BANLkTi=NGfc9p8LVO+0kv5kzt_RorQPTdQ@mail.gmail.com>
     [not found]         ` <mcrei35fmlc.fsf@coign.corp.google.com>
2011-06-07 20:09           ` Abdul Wahid Memon
2011-06-07 20:15             ` Ian Lance Taylor
2011-06-07 22:34               ` Abdul Wahid Memon
2011-06-07 22:54                 ` Ian Lance Taylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).