Lorenzo Casalino via llvm-dev
2019-Aug-04 15:46 UTC
[llvm-dev] Manually insert an instruction in SelectionDAG
> 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
Kaarthik Alagapan via llvm-dev
2019-Aug-06 01:35 UTC
[llvm-dev] Manually insert an instruction in SelectionDAG
Got it Lorenzo, thank you so much! On Aug 4, 2019, 11:46 AM -0400, Lorenzo Casalino <lorenzo.casalino93 at gmail.com>, wrote: 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://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.llvm.org%2Fdocs%2FWritingAnLLVMBackend.html%23assembly-printer&data=02%7C01%7Ckaarthik%40knights.ucf.edu%7C7047cc2b00da42049fdc08d718f2f3c3%7C5b16e18278b3412c919668342689eeb7%7C0%7C1%7C637005304059691315&sdata=rt1K%2FxDYn1A3x%2BR%2FfS5ZY8I71EKKHJHYfPdeprWfADI%3D&reserved=0 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190806/dd97c223/attachment.html>