[LLVMdev] ConstantRange in PR1255

Stepan Dyatkovskiy stpworld at narod.ru
Wed Apr 25 23:47:11 PDT 2012


Hi, Duncan.

unionWith result is differs from set union, since it produces single set 
always while set operations may produce two sets.

E.g.:
For ranges
[1, 5) and [10,15)
unionWith produces [1,15), while set union should just keep these sets 
without changing, probably with indication that sets are not 
intersected. Implementation of set union is simple though.

The "symmetric difference" implementation is little bit more complex.
For two sets
[1,15) and [7,12)
symmetric difference is pair of ranges:
[1,7) and [12,15)

I propose to implement these methods in ConstantRange (I can do it).

-Stepan.








More information about the llvm-dev mailing list