determine the basic_block inside if and else


I used a functionPass to count the number of bloks ?

so for each BBlock I check if it is a loop or BB …

and I’m wandring How can I determine if a BB is a conditional block (if) ??
and How can I separate between the BBs inside the if and those inside the else ??

Thank you so much