Not. There may be several basic blocks of a function terminator, for example, a function containing several return statements. each base block containing a function return statement will be called a terminator block or a terminator base block. To find all the base blocks that are the base blocks of the terminator (i.e., contain the return statement), follow these steps:
runOnFunction { for BB in F: for I in BB: if (ReturnInst *RI = dyn_cast<ReturnInst> I) BB is terminator Basic Block endif endfor endfor }
source share