call_insns in RTX form--two questions

sean yang seanatpurdue@hotmail.com
Tue May 30 04:10:00 GMT 2006


The first question is: If I want to find a BB that containing a specific 
function call (say 'foo'), is there an easy way in the RTX level?

The second one is: how can i get the order of different call foo in the 
final assembly code. Can I get it by dumping some information, say the order 
of the instruction link list, in RTL representation?

Many thanks,
Sean

-----------------------------------------------------------------------
  FOR_EACH_BB(bb){
    for (cur_insn = BB_HEAD (bb); cur_insn != NEXT_INSN (BB_END (bb));
	 cur_insn = NEXT_INSN (cur_insn)){
      if (GET_CODE (cur_insn)==CALL_INSN && /*test if the call is 'foo'*/){ 
//Question (1)
	 fprintf ("this is %dth call foo instruction \n", /*some dump*/); 
//Question (2)
      }
    }
  }
------------------------------------------------------------------------

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/



More information about the Gcc mailing list