[PATCH] D79164: [CostModel] getCFInstrCost

Jinsong Ji via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 21 08:03:45 PDT 2020


jsji added a comment.

In D79164#2020105 <https://reviews.llvm.org/D79164#2020105>, @samparker wrote:

> Fixed some tests that needed asserts... which meant passing the CostKind from the vectorizer too special handling Phis in the base implementation. The important test is in PowerPC where the vector factor is now the same for PPC8 and PPC9. @jsji would you mind taking a look?


Sorry, this was buried in my notifications so got ignored. I saw you have updated PowerPC part so there is no difference here now. Thanks.



================
Comment at: llvm/include/llvm/Analysis/TargetTransformInfoImpl.h:433
+    // will require a register.
+    if (Opcode == Instruction::PHI && CostKind != TTI::TCK_RecipThroughput)
+      return 0;
----------------
Looks like this is more aggressive than most target-specific implementation? 
`CostKind != TTI::TCK_RecipThroughput` is more than  `if (CostKind == TTI::TCK_CodeSize || CostKind == TTI::TCK_SizeAndLatency)`

Is this intended? 


================
Comment at: llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp:761
+
+  return 0;
+}
----------------
Any specific reason we would like to force 0 for PowerPC?  


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

https://reviews.llvm.org/D79164





More information about the llvm-commits mailing list