[llvm-commits] ConstantRange

Reid Spencer rspencer at reidspencer.com
Wed Feb 28 16:41:04 PST 2007


Hi Nick,

On Wed, 2007-02-28 at 19:29 -0500, Nick Lewycky wrote:

> In my tree, I have an additional constructor for ConstantRange that
> takes an ICmpInst::Predicate and a ConstantRange. It returns the range
> where all of the values in the range satisfy the predicate against any
> of the values in the argument range.
> 
> Where would a method like this fit, assuming that it doesn't belong in a
> pass?

I have removed the ConstantRange(Predicate, ConstantInt) constructor.
You can now get that functionality from the ICmpInst class. Note sure
that's the perfect place for it, but I figured since one needed to get a
Predicate that ICmpInst would be included. 

Please note that ConstantRange is now in lib/Support, not lib/Analysis.
Thus, it must not include anything from lib/VMCore, to avoid cyclic
library dependencies. 

Net/net .. put it where you like it. I would vote for just putting it in
PredSimplify for now. If some other pass needs it later on, we can move
it. Code locality is a good thing and if predsimplify is the only
client, it might as well define it.

Reid.

> 
> Nick
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list