On Tue, Dec 30, 2008 at 8:38 PM, Ian Lance Taylor <i...@google.com> wrote: > "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.
You can also just resurrect the CFG when you enter your machine reorg pass. See how ia64 does that, for example (grep for compute_bb_for_insn). Gr. Steven