[LLVMdev] signed/unsigned integers ?
Julien Henry
Julien.Henry at imag.fr
Wed Mar 30 03:19:37 PDT 2011
>> The compiler remembers for debugging purpose that x is defined as
>> unsigned, and y as signed, no ? I'm not familiar with LLVM debug info,
>> but maybe I can find this info there ?
>
> probably it can be extracted from debug info, but what if there is no debug
> info? Can you please explain what you intend to do with this information -
> then maybe we can suggest another way to solve your problem.
>
Thanks for your help.
Actually, I'm working on a static analyzer that computes invariants at
each basicBlock: "In basicBlock B, what is the set of possible
assignments for each live values ?"
and I obtains results such as "In B, we have 0 <= x <= 42"
For an function's argument of type T, at the beginning of my analysis, I
consider its set of possible values is all the set of all elements of
type T.
In the case of an int, it is [-2^31; 2^31-1], whereas it is [0, 2^32-1]
for an unsigned...
That's the reason why I was searching in the llvm bitcode something
distinguishing these two types.
Julien Henry
More information about the llvm-dev
mailing list