[llvm-dev] Manually insert an instruction in SelectionDAG

Lorenzo Casalino via llvm-dev llvm-dev at lists.llvm.org
Sun Aug 4 08:46:41 PDT 2019


> Can I get some guidance on what function I should use to insert a .byte/.word in SelectionDAG so it’s printed out in assembly?

As far as I know, up to the CodeGen phase, LLVM works on a
target-agnostic representation of the original code; low
level concepts, such as ASM directives, are not handled; thus, it is not
possible to add them in the SelectionDAG or
in the subsequent machine specific representation.

As pointed out by Tim, you could print them during the code emission
phase [1].

-- Lorenzo

-------

[1]: https://www.llvm.org/docs/WritingAnLLVMBackend.html#assembly-printer




More information about the llvm-dev mailing list