Branch Divergence in SIMT Machines: From Control-Flow Graph Theory to Compiler Divergence Analysis in LLVM