[PATCH] D79483: [CostModel] Replace getUserCost with getInstructionCost.

Sam Parker via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 18 03:10:50 PDT 2022


samparker accepted this revision.
samparker added a comment.
This revision is now accepted and ready to land.

LGTM, and thanks for doing this.



================
Comment at: llvm/include/llvm/Analysis/TargetTransformInfoImpl.h:505
+    // Assume a 3cy latency for fp arithmetic ops.
+    if (CostKind == TTI::TCK_Latency) {
+      if (Ty->getScalarType()->isFloatingPointTy())
----------------
RKSimon wrote:
> samparker wrote:
> > Would it be better, for now, to keep this in the X86 backend, if you need it there?
> getInstructionLatency did have this as the default for all fp results
> 
> As well as x86 it causes one aarch64 sve fadd cost test to change from latency cost = 3 to 1 - not sure if thats enough of a reason to keep it generic or not?
> getInstructionLatency did have this as the default for all fp results
Okay, fine then.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D79483



More information about the llvm-commits mailing list