[llvm-commits] [llvm] r89530 - in /llvm/trunk: include/llvm/CodeGen/LiveVariables.h lib/CodeGen/LiveVariables.cpp lib/CodeGen/PHIElimination.cpp lib/CodeGen/PHIElimination.h

Jakob Stoklund Olesen stoklund at 2pi.dk
Sun Nov 22 11:26:25 PST 2009


On Nov 22, 2009, at 11:06 AM, Anton Korobeynikov wrote:

> Hello, Jakob
> 
>> At the machine code level, switches become either branching trees or jumptable branches.
> No :) There are 4 different "patterns" used currently for switch lowering:
> 
> 1. Direct comparison (used for small switches)
> 2. Jumpt tables (used for dense switches)
> 3. Bit-tests (used for switches with not so big range span and going
> into few destinations)
> 4. Branch trees combining 1 / 2 / 3

Sure, fair enough.

My point was that after lowering you have a number of basic blocks terminated by either conditional branches or jump tables. The conditional branches don't have multiple edges to the same successor, and I don't touch jump tables.

/jakob

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1929 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20091122/14c22926/attachment.bin>


More information about the llvm-commits mailing list