[PATCH] D26872: Outliner: Add MIR-level outlining pass

Adrian Prantl via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 18 16:28:32 PST 2016


aprantl added inline comments.


================
Comment at: lib/CodeGen/MachineOutliner.cpp:30
+
+    // First, check if the current instruction is legal to outline at all
+    bool IsSafeToOutline = TII->isLegalToOutline(*BBI);
----------------
The LLVM coding guidelines prefer full sentences with a trailing "." at the end.


================
Comment at: lib/CodeGen/MachineOutliner.cpp:199
+  while (EndIt != StartIt) {
+    MI = MF.CloneMachineInstr(&*EndIt);
+    MI->dropMemRefs();
----------------
I looked at the implementation of MachineFunction::CloneMachineInstr() but I still can't tell:
What happens when the original instruction has a debug location on it - will it be stripped?
What happens when the original instruction is a DBG_VALUE - will it be copied?


================
Comment at: lib/CodeGen/MachineOutliner.cpp:348
+
+  delete ST;
+  return OutlinedSomething;
----------------
Maybe use a unique_ptr for this?


Repository:
  rL LLVM

https://reviews.llvm.org/D26872





More information about the llvm-commits mailing list