[LLVMdev] GenericValue changes from 1.8 to 2.0
Sarah Thompson
thompson at email.arc.nasa.gov
Tue Jul 17 13:46:35 PDT 2007
Chris Lattner wrote:
> On Tue, 17 Jul 2007, Sarah Thompson wrote:
>
>
>> Do I understand correctly that there is nothing that the current gcc
>> front end generates that wouldn't fit an old-style GenericValue? I'm
>> wondering if this might be an interim approach that would avoid me
>> needing to rewrite huge amounts of code, and since we're not likely to
>> be supporting anything other than C and C++ in the forseeable future, it
>> makes some sense. Model checking VHDL and Verilog can come later. :-)
>>
>
> Right now, the only interesting thing is 128-bit integers. You can get
> these on 64-bit targets if you use some funky GCC extensions. Normal code
> only produces "usual" sized integers.
>
OK, in that case I have a 2 phase plan:
1: Refactor my code to use a 'OldGenericValue' class that resembles the
pre-2.0 version of GenericValue, and implement conversions as necessary.
This will require relatively few changes to my code, so shouldn't be too
much of a problem as a first step. This should leave me with a working
model checker relatively quickly (and fewer sharp things waved at me by
other NASA people who are waiting for it).
2: Refactor the code again to move to the for-real GenericValue class.
This is a harder/longer job, but I should at least have a working
version of the model checker while I'm working on it.
In an ideal world, I'd go straight for 2, but I'm under too much time
pressure to go that route unfortunately. None of this should require
unusual versions of LLVM or changes to the LLVM codebase. My intention
is initially to do this against the 2.0 release, but once that's working
(probably concurrently with 2 above) I intend to move to coding against
the head branch of LLVM so that my code evolves along with the rest of
LLVM. I might be able to give more useful feedback to you lot that way
too, of course.
Sarah
More information about the llvm-dev
mailing list