On 6/1/06, sean yang <[EMAIL PROTECTED]> wrote:
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?
At least two reasons:
1) BASIC_BLOCK(i) may be NULL.
2) FOR_{EACH,ALL}_BB is preferred.
Gr.
Steven