[PATCH] D44839: [llvm-mca] Add flag -instruction-tables to print the theoretical resource pressure distribution for instructions (PR36874)

Andrea Di Biagio via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Mar 24 08:24:54 PDT 2018


andreadb added a comment.

Thanks Simon



================
Comment at: tools/llvm-mca/InstructionTables.cpp:40
+      double Cycles = static_cast<double>(Resource.second.size());
+      if (!Cycles)
+        continue;
----------------
RKSimon wrote:
> Better to test for Resource.second.empty() and create Cycles after the continue? Comparing floats with zero always makes me nervouse - even for trivial cases like this.
Right.. I will fix it.


================
Comment at: tools/llvm-mca/llvm-mca.cpp:363
+    Printer->addView(
+        llvm::make_unique<mca::ResourcePressureView>(*STI, *IP, *S));
 
----------------
RKSimon wrote:
> Commit this clang-format fix separately.
Okay.


https://reviews.llvm.org/D44839





More information about the llvm-commits mailing list