Tracking basic blocking in LLVM

Hello,

Does LLVM have any data structure that keeps track of blocks within a structured basic block?

example:
if (condition){
for (i=0 → 100) B1;
for (j=0 → 100) B2;
for (k=0 → 100) B3;

else{

for (i=0 → 100) B4;
for (j=0 → 100) B5;
for (k=0 → 100) B6;
}

I want to build two lineages ( B1-> B2-> B3) and ( B4->B5->B6). I aiming to fuse blocks within the same lineages.

Thanks,