Jakob Stoklund Olesen
2012-Mar-30 21:30 UTC
[LLVMdev] getInstructionName() in XXXGenAsmWriter.cpp
Is this function required? MCInstrInfo::getName(OpCode) returns the same string, and we have two copies of the string table now. Can MCInstrPrinter refer to MCInstrInfo, and why not? /jakob
Benjamin Kramer
2012-Mar-30 22:12 UTC
[LLVMdev] getInstructionName() in XXXGenAsmWriter.cpp
On 30.03.2012, at 23:30, Jakob Stoklund Olesen wrote:> Is this function required? > > MCInstrInfo::getName(OpCode) returns the same string, and we have two copies of the string table now. > > Can MCInstrPrinter refer to MCInstrInfo, and why not?I looked into this at some point and if my memory serves me correctly using MCInstrInfo in the printer would create a cyclic dependency between the libXXXAsmPrinter and libXXXDesc for the target. I guess libXXXDesc could be refactored not to depend on libXXXAsmPrinter but I haven't checked what exactly uses it. - Ben> /jakob > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Jakob Stoklund Olesen
2012-Mar-30 22:33 UTC
[LLVMdev] getInstructionName() in XXXGenAsmWriter.cpp
On Mar 30, 2012, at 3:12 PM, Benjamin Kramer <benny.kra at googlemail.com> wrote:> > On 30.03.2012, at 23:30, Jakob Stoklund Olesen wrote: > >> Is this function required? >> >> MCInstrInfo::getName(OpCode) returns the same string, and we have two copies of the string table now. >> >> Can MCInstrPrinter refer to MCInstrInfo, and why not? > > I looked into this at some point and if my memory serves me correctly using MCInstrInfo in the printer would create a cyclic dependency between the libXXXAsmPrinter and libXXXDesc for the target. I guess libXXXDesc could be refactored not to depend on libXXXAsmPrinter but I haven't checked what exactly uses it.I thought it was something like that. The AsmPrinter wouldn't need to depend on the XXXMCTargetDesc library, though. It just needs an MCInstrInfo pointer. It already has an MCRegisterInfo pointer. The regIsInRegisterClass() function also looks like it is identical to MCRegisterClass::contains(). It it even used anywhere? /jakob
Possibly Parallel Threads
- [LLVMdev] getInstructionName() in XXXGenAsmWriter.cpp
- [LLVMdev] getInstructionName() in XXXGenAsmWriter.cpp
- MCRegisterClass mandatory vs preferred alignment?
- [LLVMdev] Recent changes to MCRegisterClass fields: uint8_t is too narrow
- [LLVMdev] Recent changes to MCRegisterClass fields: uint8_t is too narrow