This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: call_insns in RTX form--two questions


I guess maybe the 2nd question is a little uncommon, but thank for any advice.


From: "sean yang" <seanatpurdue@hotmail.com>
To: gcc@gcc.gnu.org
Subject: call_insns in  RTX form--two questions
Date: Tue, 30 May 2006 04:09:03 +0000

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/



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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]