compiler: split-out compileCFG method