[llvm-commits] [llvm] r171158 - in /llvm/trunk/include/llvm: ADT/IntervalMap.h CodeGen/SlotIndexes.h

Jakob Stoklund Olesen stoklund at 2pi.dk
Sat Dec 29 13:13:43 PST 2012


On Dec 27, 2012, at 3:29 AM, Chandler Carruth <chandlerc at gmail.com> wrote:

> Author: chandlerc
> Date: Thu Dec 27 05:29:17 2012
> New Revision: 171158
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=171158&view=rev
> Log:
> Provide a common half-open interval map info implementation, and just
> re-use that for SlotIndexes. This way other users who want half-open
> semantics can share the implementation.

Hi Chandler,

In retrospect, I think it was a premature abstraction to support closed intervals at all. It wasn't quite clear at the time if SlotIndexes would work better with closed or half-open intervals. That has been settled now, they definitely want half-open intervals.

It would be perfectly fine to have the default IntervalMapInfo implementation provide half-open semantics. Then we can also get rid of the gross 'a+1' in the adjacent() implementation.

/jakob





More information about the llvm-commits mailing list