[llvm-dev] Support for Range analysis in LLVM
John Regehr via llvm-dev
llvm-dev at lists.llvm.org
Tue Jun 6 14:31:01 PDT 2017
LLVM has two analyses that might do what you are looking for, check out
lib/Analysis/ValueTracking.cpp and lib/Analysis/LazyValueInfo.cpp.
John
On 6/6/17 11:54 AM, Jajoo, Malhar via llvm-dev wrote:
> Hi,
>
>
> I wish to compile something like -
>
>
> bits(4) UInt( bits(2) x )
>
> {
>
> switch(b)
>
> {
>
> case 0:
>
> return '0000';
>
> case 1:
>
> return '0001';
>
> case 2 :
>
> return '0010';
>
> case 3:
>
> return '0011';
>
>
> }
>
> }
>
>
> int datasize = UInt(a);
>
>
>
> *My Question: Is there some way to perform Range Analysis over the
> function "UInt()" return value ?*
>
>
> It would be great if someone can help me out.
>
> Thanks,
>
> Malhar
>
>
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
More information about the llvm-dev
mailing list