[PATCH] D59252: [TTI] getMemcpyCost

Tim Northover via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 12 08:20:49 PDT 2019


t.p.northover added inline comments.


================
Comment at: include/llvm/Analysis/TargetTransformInfoImpl.h:144
+  unsigned getMemcpyCost(const Instruction *I) {
+    return TTI::TCC_Basic;
+  }
----------------
That seems optimistic, even as a default. I'd probably bump it to TCC_Expensive if just one load/store is needed, and a size-based estimate would be even better (is there a DataLayout handy to calculate length in terms of pointer-words?)


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

https://reviews.llvm.org/D59252





More information about the llvm-commits mailing list