[llvm-commits] [llvm] r114791 - in /llvm/trunk: include/llvm/CodeGen/LiveInterval.h lib/CodeGen/InlineSpiller.cpp lib/CodeGen/LiveInterval.cpp lib/CodeGen/LiveIntervalAnalysis.cpp lib/CodeGen/PreAllocSplitting.cpp lib/CodeGen/RegAllocLinearScan.c

Jakob Stoklund Olesen stoklund at 2pi.dk
Mon Sep 27 10:29:42 PDT 2010


On Sep 25, 2010, at 8:50 PM, Lang Hames wrote:
> 
> Thanks for the suggestions. They've been applied in r114798.

Thanks
.
> Would it be possible to simply use SlotIndex() here? I am not completely clear on the difference, but it would be nice to have just one exceptional SlotIndex.
> 
> LiveIntervals::getZeroIndex() returns an index which will compare lower than any other (and is the valid first index in the function). SlotIndex() values will compare higher than any other. Whether any code actually relies on this property I am not sure. SlotIndex() values are _not_ valid slots for any function, and it's impossible to traverse from them to any valid slot. They're self contained "weird" values. For that reason I think SlotIndex() would be better as the exceptional value. 

I agree.

There are not many uses of getZeroIndex. One place in SimpleRegisterCoalescing is using it to recognize live-in registers. That assumes getZeroIndex == getMBBStartIndex(entry-block). Which is probably OK.

/jakob





More information about the llvm-commits mailing list