[PATCH] D28307: Add Instruction number to LSR cost model (PR23384) part 1 of 3

Hal Finkel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 24 17:29:22 PST 2017


hfinkel added inline comments.


================
Comment at: lib/Transforms/Scalar/LoopStrengthReduce.cpp:1256
 bool Cost::operator<(const Cost &Other) const {
+  if (InsnsCost && Insns != Other.Insns)
+    return Insns < Other.Insns;
----------------
evstupac wrote:
> hfinkel wrote:
> > Do you really want to make this the most-important factor?
> Yes. What is more important than instruction count on this stage?
Fair enough.


================
Comment at: test/Transforms/LoopStrengthReduce/X86/lsr-insns-1.ll:1
+; RUN: llc < %s -O2 -march=x86-64 -lsr-insns-cost -stats 2>&1 | grep "asm-printer" | grep 7
+
----------------
Please use FileCheck, not grep (and match the name of the statistic, not just the number and the pass name).


Repository:
  rL LLVM

https://reviews.llvm.org/D28307





More information about the llvm-commits mailing list