[llvm-commits] [patch] Minor X86CodeEmitter Memory Foot Reduction
Chris Lattner
clattner at apple.com
Mon Jul 6 15:11:49 PDT 2009
On Jul 6, 2009, at 3:07 PM, Aaron Gray wrote:
>>
>> Hi Aaron, what part of your design talks about this? What problem
>> is templating this all solving?
>
> Templating allows us to have mutiple types of MachineCodeEmitters,
> the JITCodeEmitter, and the ObjectCodeEmitter, and any other kind of
> CodeEmitter we require in the future, e.g. Reid Kleckner'
> requirements to combine JIT and GDB. It allows these emiiters to be
> efficient and be inlined functions. If you study the code you will
> see what I mean.
There are many other ways to split this out. Emitting machine code
should not need templates. This sounds like you have the wrong
abstraction level here. Why can't virtual methods, containment, etc
be used instead of templates? The X86 code that says "output an add
as these 3 bytes" should be completely independent from the code that
does something with the bytes.
-Chris
More information about the llvm-commits
mailing list