search for: mo_metadata

Displaying 4 results from an estimated 4 matches for "mo_metadata".

Did you mean: md_metadata
2011 Nov 20
0
[LLVMdev] How can I output assembly comments from emitPrologue()?
...t AsmString = asmstr; let Pattern = pattern; } 2. I then defined a comment instruction, ala: def COMMENT : FakeInst<(outs), (ins Reg:$fake), "; $fake", []>; 3. I added the following to printOperand(...) in XXXAsmPrinter.cpp: switch (MO.getType()) { ... case MachineOperand::MO_Metadata: O << cast<MDString>(MO.getMetadata()->getOperand(0))->getString(); break; ... } 4. Finally, whenever I needed to emit comments I call the following: MDNode* comment = MDNode::get(getGlobalContext(), ArrayRef<Value*>(MDString::get(getGlobalContext(), "COMMEN...
2011 Nov 20
2
[LLVMdev] How can I output assembly comments from emitPrologue()?
Dear all, I am looking to output assembly comments in my emitPrologue() function, just for my own readability. Searching for a way to do this found me this thread - http://lists.cs.uiuc.edu/pipermail/llvmdev/2011-October/043722.html, which says that the best way to output comments from somewhere like emitPrologue() is to: 1. Create an MDString for the comment. 2. Attach it to an LLVM
2017 Nov 29
3
question: access IR class Instruction from DAG SDValue
Seems llvm cannot pass metadata to MachineInstr, or setting operand description in class Instruction and pass to class MachineInstr. Is it a good idea to extend llvm kernel structure to having this feature? Jonathan > On Nov 27, 2017, at 9:01 PM, Jatin Bhateja <jatin.bhateja at gmail.com> wrote: > > SelectionDAGBuilder contained within SelectionDAGISel has a map (NodeMap) b/w
2011 Nov 21
0
[LLVMdev] How to get ELF section virtual starting address from MCSymbolRefExpr?
...t AsmString = asmstr; let Pattern = pattern; } 2. I then defined a comment instruction, ala: def COMMENT : FakeInst<(outs), (ins Reg:$fake), "; $fake", []>; 3. I added the following to printOperand(...) in XXXAsmPrinter.cpp: switch (MO.getType()) { ... case MachineOperand::MO_Metadata: O << cast<MDString>(MO.getMetadata()->getOperand(0))->getString(); break; ... } 4. Finally, whenever I needed to emit comments I call the following: MDNode* comment = MDNode::get(getGlobalContext(), ArrayRef<Value*>(MDString::get(getGlobalContext(), "COMMEN...