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

Chris Lattner clattner at apple.com
Mon Nov 23 09:38:52 PST 2009


On Nov 22, 2009, at 10:11 AM, Jakob Stoklund Olesen wrote:

> 
> On Nov 22, 2009, at 6:09 AM, Chris Lattner wrote:
>> 
>> I haven't looked at the code at all, but I want to bring up one subtlety of critical edge splitting.  In switches which have multiple edges to the same destination (on different values), these edges are always critical.  However, they should be split together as a unit, not individually.  I don't know if your code considers this or not, but this is the idea behind the "SplitEdgeNicely" logic that appears in a couple places.
> 
> I hadn't considered that issue, but I think I have managed to avoid it.
> 
> At the machine code level, switches become either branching trees or jumptable branches. In the first case, the switch has been converted to if/else code, and the issue disappears. In the second case I leave the edge alone because AnalyzeBranch fails.
> 
> I don't want to start tampering with jump tables because I think they can be shared.

Ah, that makes sense.  So long as you don't muck with edges from switches, everything should be good, thanks!

-Chris



More information about the llvm-commits mailing list