Hello All, I looked at FINAL_PRESCAN_INSN, and as Ian mentioned, I do not have any CFG info or the basic block pointers. I really would like to reporoduce that information at that stage. I looked at passes.c and the cfgbuild.c, and if I do thefollowing:
ind_basic_blocks(get_insns()); Compute_bb_for_insn(); Will this both lines above create a valid CFG and put the appropriate basic block boundaries. Or is there a way I can find the basic block boundaries (that's all I need, nothing else) by just looking at the RTL? I am using GCC 4.0.2 Any help is highly appreciated! Thanks, Balaji V. Iyer. -- Balaji V. Iyer PhD Candidate, Center for Efficient, Scalable and Reliable Computing, Department of Electrical and Computer Engineering, North Carolina State University. -----Original Message----- From: Ian Lance Taylor [mailto:i...@google.com] Sent: Tuesday, December 30, 2008 2:38 PM To: Balaji V. Iyer Cc: gcc@gcc.gnu.org Subject: Re: Code Motion after Machine Dependent Reorganization?? "Balaji V. Iyer" <bvi...@ncsu.edu> writes: > Thanks for your help. What I mainly want to do is to make some > hardware decisions by looking at the instructions inside a Basic block. > Ths is why I was using the "FOR_EACH_BB" function. > > When and where can I intercept the RTL such that I can get the RTL > that matches the output assembly equivalents? I am willing to add my > own hook if necessary. If you want to look at RTL which precisely matches the output assembly, then you should use FINAL_PRESCAN_INSN. You won't get basic block markers, though. If you want to look at RTL which is pretty close to the output assembly, and for which the basic blocks are reasonably valid, then you should write a pass which runs somewhere after the second scheduling pass. Ian