My understanding is that: both are used to traverse BBs and the only (potential )difference is the order of the traversal. 'FOR_EACH_BB' traverses BBs throught the linked list order; 'for (i=0; i<n_basic_blocks; i++){bb=BASIC_BLOCK(i);}' traverses accoring to the BB's index (because BASIC_BLOCK(i)->index ==i)

(Please correct me if my understanding is wrong:) )

So, is there any particular reason to pick up on over the other? For example, function 'compute_defs_uses_and_gen()' in bt-load.c uses the latter one to traverse basic blocks, but most other routines use the first one to traverse BBs.

Thanks,

_________________________________________________________________
Is your PC infected? Get a FREE online computer virus scan from McAfee® Security. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963

Reply via email to