[LLVMdev] Question about PseudoInstExpansion

Akira Hatanaka ahatanak at gmail.com
Thu Oct 3 15:14:44 PDT 2013


I am trying to do the following pseudo-to-real instruction conversion:

PseudoMFHI GPR32:$rd, ACC64:$ac -> MFHI GPR32:$rd

Is there a way to tell the assembler, disassembler and instprinter to
ignore the ACC64:$ac operand? I know I can use PseudoInstExpansion to
accomplish this, but I just thought it would be convenient to have a flag
for this, something like flag "DisableEncoding". ACC64:$ac is just an
artificial operand added to create a virtual register live range.

Also, the code in utils/TableGen/PseudoLoweringEmitter.cpp (near line 141)
doesn't seem to allow converting a pseudo to a code-gen-only instruction.
What is the reason for this? Table-gen complains if I try to convert pseudo
PseudoMFHI64 to code-gen-only instruction MFHI64 using PseudoInstExpansion:

PseudoMFHI64 GPR64:$rd, ACC128:$ac -> MFHI64 GPR64:$rd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20131003/933941a4/attachment.html>


More information about the llvm-dev mailing list