[PATCH] D36636: [GISel][NFC]: Add some constructors for easy creation of MIRBuilders

Aditya Nandakumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 14 09:21:09 PDT 2017


aditya_nandakumar marked 2 inline comments as done.
aditya_nandakumar added inline comments.


================
Comment at: include/llvm/CodeGen/GlobalISel/MachineIRBuilder.h:91
+  MachineIRBuilder(MachineFunction &MF) { setMF(MF); }
+  MachineIRBuilder(MachineFunction &MF, MachineInstr &MI) {
+    setMF(MF);
----------------
qcolombet wrote:
> aditya_nandakumar wrote:
> > qcolombet wrote:
> > > We could have a constructor with only MI, if that makes the usage simpler:
> > > MachineIRBuilder(MI) : MachineIRBuild(MI.getParent()->getParent()) {
> > > setInstr(MI);
> > > }
> > You mean - instead of the above two constructors, only have one which takes MI?
> > 
> No, I mean one with MF, one with MI instead of the pair (MF MI).
> That being said if you prefer (MF, MI) instead of (MI) that works for me.
I see. One with MI should suffice for now.


Repository:
  rL LLVM

https://reviews.llvm.org/D36636





More information about the llvm-commits mailing list