[LLVMdev] ConstantRange in PR1255

Duncan Sands baldrick at free.fr
Wed Apr 25 14:00:19 PDT 2012


Hi Stepan,

> Hi Duncan. I have strange problems with you mailbox, my posts are lost sometimes on this way.

OK, sorry about that.  Do you have any details?

> I just want to duplicate answer on your question in this thread:
> http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20120305/138785.html
>
> ConstantRange has a little bit another purposes. It is not a classical range.

How do you mean?  It looks like a classical range to me!

  Yes it has Lower and Upper, but "sub" and "add" operations are differs from 
"difference" and "union" set operations.

It has intersectWith and unionWith, so I'm not sure what you mean here.
There is also "inverse" for forming the complement.

  But it is still possible to replace Range class with the ConstantRange, though 
we need to implement classical set operations to do it.

The basic set operations are already implemented as I mentioned above, though
you might want to add some convenience methods like symmetric difference.

Ciao, Duncan.



More information about the llvm-dev mailing list