[LLVMdev] MC-aware Asm Printers

Justin Holewinski justin.holewinski at gmail.com
Tue Sep 27 07:50:58 PDT 2011


I'm in the process of evaluating whether to make the PTX assembly printer
MC-aware.  It appears that most other back-ends have made the switch, but I
want to evaluate if it makes sense for the PTX back-end.  First, PTX is a
text-only format; there are no instruction encodings or object files.
 Second, the PTX back-end will never tie into the JIT compiler.

After experimenting with the conversion a bit, the main problem I'm having
right now is that MCInst instances do not tie back to a MachineFunction,
which is required (at least without severe hacks) in the PTX back-end to
refer back to the MachineFunctionInfo struct for register names, etc.  I'm
sure there are ways around this, but it would be a substantial up-front
effort.

With that said, what are the advantages of making a back-end assembly
printer MC-aware?  Is it even worth the effort for this back-end, given its
rather unique constraints?  The default AsmPrinter method is working fine,
I'm just concerned that back-ends will be required to be MC-aware at some
point in the future, making the switch inevitable.

-- 

Thanks,

Justin Holewinski
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110927/44d0ec0f/attachment.html>


More information about the llvm-dev mailing list