[PATCH] D76124: [TTI] Remove getOperationCost

Sam Parker via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 7 02:40:27 PDT 2020


samparker updated this revision to Diff 255616.
samparker added a comment.

Thanks @spatel for adding those extra tests, they highlighted changes around bitcasts:

; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r = bitcast double %x to i64
Printing analysis 'Cost Model Analysis' for function 'bitcast_f64_i64':
note: possible intended match here
Cost Model: Found an estimated cost of 0 for instruction: %r = bitcast double %x to i64

; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r = bitcast i64 %x to double
Printing analysis 'Cost Model Analysis' for function 'bitcast_i64_f64':
note: possible intended match here
Cost Model: Found an estimated cost of 0 for instruction: %r = bitcast i64 %x to double

So now 'TargetTTI' is not queried for bitcasts, unlike trunc and ptr conversions. Though I'm still very hesitate to say this is an NFC, because of the various layers and ordering of the calls, I think it is now trending that way.


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

https://reviews.llvm.org/D76124

Files:
  llvm/include/llvm/Analysis/TargetTransformInfo.h
  llvm/include/llvm/Analysis/TargetTransformInfoImpl.h
  llvm/include/llvm/CodeGen/BasicTTIImpl.h
  llvm/lib/Analysis/TargetTransformInfo.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D76124.255616.patch
Type: text/x-patch
Size: 12627 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200407/75bb83c7/attachment.bin>


More information about the llvm-commits mailing list