[PATCH] D21819: [Docs][CodeGenerator] Don't specify the number of operands in BuildMI

Krzysztof Parzyszek via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 29 05:45:10 PDT 2016


kparzysz added inline comments.

================
Comment at: docs/CodeGenerator.rst:391
@@ -393,2 +390,3 @@
   MachineBasicBlock &MBB = ...
-  BuildMI(MBB, X86::MOV32ri, 1, DestReg).addImm(42);
+  DebufLoc DL;
+  MachineInstr *MI = BuildMI(MBB, DL, get(X86::MOV32ri), DestReg).addImm(42);
----------------
Typo.

================
Comment at: docs/CodeGenerator.rst:392
@@ -395,1 +391,3 @@
+  DebufLoc DL;
+  MachineInstr *MI = BuildMI(MBB, DL, get(X86::MOV32ri), DestReg).addImm(42);
 
----------------
The "get" function is in TargetInstrInfo.  Could you make it explicit in the examples?  E.g.

```
MachineInstr *MI = BuildMI(MBB, DL, TII.get(X86::MOV32ri), DestReg).addImm(42);
```


http://reviews.llvm.org/D21819





More information about the llvm-commits mailing list