[LLVMdev] Partial evaluation and LLVM (2) (Chris Lattner)
Chris Lattner
sabre at nondot.org
Mon Jun 18 22:42:00 PDT 2007
On Sun, 17 Jun 2007, [ISO-8859-1] Stéphane Letz wrote:
> Thanks, it works with the example you gave, but how is this method
> supposed to work with a C++ method considering the object fields it
> uses as "free" variables?
> These object fields are not global variables of the module?
I can't and won't. You have to model specializable values as globals or
something else easily changable by the optimizer. If you want, you can
write a custom optimization pass to substitute any value you want, but
this is certainly the most straight-forward way to do it.
-Chris
--
http://nondot.org/sabre/
http://llvm.org/
More information about the llvm-dev
mailing list