On Mar 3, 2007, at 4:16 PM, Reid Spencer wrote: > On Sat, 2007-03-03 at 13:07 -0800, Chris Lattner wrote: >> On Mar 2, 2007, at 11:37 PM, Reid Spencer wrote: >>> Changes in directory llvm/include/llvm/ExecutionEngine: >>> GenericValue.h updated: 1.9 -> 1.10 >>> --- >>> Log message: >>> >>> Add APIntVal as a possible GenericeValue. >> >> Shouldn't APInt eliminate all of the other, smaller, integers? > > Not if you want to retain any kind of speed in LLI. Its slow enough, > didn't want to slow it down more. Note that because GenericValue is a > union I have to make the APInt member a pointer, which means a memory > allocation. Pretty certain we don't want a memory allocation on every > arithmetic operation.
Ok, could we make GV not be a union? Or a struct with an APInt and union of other things? To me, the interpreter is ideally as simple as possible, it shouldn't try to be performant. Having the interpreter have its own set of constant folding logic seems wrong. -Chris _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits