[LLVMdev] GSoC - Range Analysis
Duncan Sands
baldrick at free.fr
Tue Apr 3 12:49:17 PDT 2012
Hi John,
>> Is this really true? For example, suppose you know that X is in the range
>> [1, +inf], and now you calculate Y = 1 / X, then you get that Y is in the
>> range [0, 1]. But there is no guarantee that Y is really in that range:
>> since X might have overflowed it might for example be equal to -1, in which
>> case Y would be equal to -1 too, outside the range [0, 1]. In short, I doubt
>> you can conclude that a variable Y is really in a range [c1, c2] just from the
>> information that c1 > -inf and c2 < +inf. I think you also need to look at the
>> history of how you got there.
>
> Duncan these problems can definitely be solved.
I didn't say it couldn't be solved, I was just pointing out that Victor probably
made a wrong statement.
Ciao, Duncan.
More information about the llvm-dev
mailing list