[PATCH] D92178: [NFC][InstructionCost] Change LoopVectorizationCostModel::getInstructionCost to return InstructionCost

Sander de Smalen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 7 10:13:22 PST 2021


sdesmalen added a comment.

LGTM, but it's not clear to me if @ctetreau's latest comment still needs to be addressed.



================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:5666
 
-  float Cost = expectedCost(ElementCount::getFixed(1)).first;
-  const float ScalarCost = Cost;
+  InstructionCost ExpectedCost = expectedCost(ElementCount::getFixed(1)).first;
+  LLVM_DEBUG(dbgs() << "LV: Scalar loop costs: " << ExpectedCost << ".\n");
----------------
nit: `ExpectedScalarCost` ?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D92178/new/

https://reviews.llvm.org/D92178



More information about the llvm-commits mailing list