[llvm-commits] [patch] Define a canonical order for the pairs in the range metadata

Nuno Lopes nunoplopes at sapo.pt
Wed May 30 14:51:51 PDT 2012


Seems good to me.
But what if the upper side overflows? something like:
[0,5) and [6,1)

I think this should be rejected as well, since the intervals are also  
overlapping.

Nuno

P.S.: I think your check should be uge instead of gut, so that [0,1),  
[1,2) gets rejected.


Citando Rafael EspĂ­ndola <rafael.espindola at gmail.com>:

> While working on PR12979 I found it useful to assume that the
> intervals in the range metadata to be in a canonical order. This patch
> enforces them to be non-overlapping, non-contiguous and sorted by the
> lower end (signed comparison).
>
> While this can be seen as a minor backward incompatibility, all
> frontends produce IL with only one interval in the range metadata and
> I am currently implementing the first case where we will merge two
> ranges, so I don't think it would actually reject any existing
> bitcode.
>
> Cheers,
> Rafael






More information about the llvm-commits mailing list