[llvm-commits] value range analysis based on scalar-evolutions

Nick Lewycky nicholas at mxc.ca
Mon Jun 2 19:58:19 PDT 2008


Török Edwin wrote:
> Nick Lewycky wrote:
>> I've implemented an analysis pass that uses SCEV to determine value
>> ranges of integer-typed registers.
>>
>> Currently it maintains a map of Value* to ConstantRange*, which is
>> rather inelegant.
> 
> There is a SCEVHandle->getValueRange(), perhaps you could move the
> implementation there and then you wouldn't need the map?

I was planning to delete that. It's unfinished and unused. Alternately, 
I could move the LoopVR implementation stuff over there, and leave just 
a map as an analysis to be updated. (But who would fill that map? We 
don't want scalar-evolutions to waste its time when nobody's requested 
that data.)

>> I was thinking we could have one analysis which would do that and
>> others that would update the central analysis.
> 
> There is also Transforms/Scalar/PredicateSimplifier that tracks value
> ranges.
> It would be nice to have all that value range info available to other
> passes as well.

Yup! I'm trying to break predsimplify down into its composite pieces to 
replace the behemoth that is the current predsimplify pass.

Nick




More information about the llvm-commits mailing list