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/

Reply via email to