On Sun, May 5, 2013 at 12:39 PM, Sudakshina Das <sudakshina1...@gmail.com> wrote: > You can use the iterator FOR_EACH_EDGE in this form: > > FOR_EACH_EDGE (e, ei, bb->preds) > > where e is an edge ei is edge iterator bb is a basic block.
Oh, I guess this is exactly what I need. Now, I looked it up, basic_block.h has such an example but deep down at ~890th line, no wonder I managed to miss it impatiently. And after obtaining the pred edges, I can get the src block, and through that any of the contained gimple stmt. Looks like problem solved, thanks a lot. -- Kartik http://k4rtik.wordpress.com/