[PATCH] D29004: New OptimizationRemarkEmitter pass for MIR

Adam Nemet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 24 17:29:30 PST 2017


anemet added inline comments.


================
Comment at: include/llvm/CodeGen/MachineOptimizationRemarkEmitter.h:127-128
+public:
+  MachineOptimizationRemarkEmitter(MachineFunction *MF,
+                                   MachineBlockFrequencyInfo *MBFI)
+      : MF(MF), MBFI(MBFI) {}
----------------
MatzeB wrote:
> Use reference for MF and MBFI if they cannot be nullptr.
MF is done. MBFI can be null.


================
Comment at: include/llvm/CodeGen/MachineOptimizationRemarkEmitter.h:179
+
+  MachineOptimizationRemarkEmitter &getORE() {
+    assert(ORE && "pass not run yet");
----------------
MatzeB wrote:
> Can be `const`
No, we need to call emit through this reference.


https://reviews.llvm.org/D29004





More information about the llvm-commits mailing list