[PATCH] D20769: [IPRA] Interprocedural Register Allocation - Analysis Passes

Mehdi AMINI via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 6 13:20:13 PDT 2016


mehdi_amini added inline comments.

================
Comment at: include/llvm/CodeGen/RegisterUsageInfo.h:51
@@ +50,3 @@
+    TRI = TRI_;
+  }
+
----------------
Is the TRI dependent on the Target or the SubTarget? 
If it is the latter, it can change on each function and thus needs to be in the map (at which point we better have a dedicated class for the map value)

================
Comment at: include/llvm/CodeGen/RegisterUsageInfo.h:56
@@ +55,3 @@
+  void setMCRegisterInfo(const MCRegisterInfo *MCRI_) {
+    MCRI = MCRI_;
+  }
----------------
Same question.

================
Comment at: lib/CodeGen/RegisterUsageInfo.cpp:24
@@ +23,3 @@
+
+cl::opt<bool> DumpRegUsage("dump-regusage", cl::init(false), cl::Hidden,
+            cl::desc("Dump register usage details collected for analysis."));
----------------
I'm not sure the name of the option is great, but I'll leave the naming to Quentin/Matthias.

================
Comment at: lib/CodeGen/RegisterUsageInfo.cpp:49
@@ +48,3 @@
+    }
+  }
+
----------------
Can you implement the print in a separate `print` method with the same signature as the other analyses for consistency?
And call it from here being the `DumpRegUsage` flag?


http://reviews.llvm.org/D20769





More information about the llvm-commits mailing list