[llvm-commits] [llvm-gcc-4.2] r85513 - in /llvm-gcc-4.2/trunk/gcc: llvm-convert.cpp llvm-internal.h

Duncan Sands baldrick at free.fr
Thu Oct 29 14:01:49 PDT 2009


Hi Bob,

> Besides consistency with clang, the idea behind doing it this way is to 
> reduce the number of edges in the CFG.  Indirect branches are typically 
> used in things like interpreter loops, where you have a large number of 
> labels and a large number of gotos.  If you add an edge from every goto 
> to every label, the CFG can blow up.  Instead we have a single indirect 
> branch and all the gotos branch to it, basically factoring out the CFG.

but gcc already does this factorization for you IIRC.  So you should find
that there is already only one computed goto in the gimple no matter how
many there were to start off with.

Ciao,

Duncan.



More information about the llvm-commits mailing list