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

Bob Wilson bob.wilson at apple.com
Mon Nov 2 14:42:34 PST 2009


On Oct 29, 2009, at 3:09 PM, Bob Wilson wrote:

>
> On Oct 29, 2009, at 2:01 PM, Duncan Sands wrote:
>
>> 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.
>
> Oh, I didn't know that.  I was just trying to be consistent with the
> existing code in llvm-gcc and clang.  I'll have another look at it.
> If what you say is correct, I agree that the dragonegg approach would
> be better.

I've changed it to use the dragonegg code.  Thanks, Duncan!



More information about the llvm-commits mailing list