[PATCH] D62409: TTI: Improve default costs for addrspacecast

Hal Finkel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 3 10:29:27 PDT 2019


hfinkel added inline comments.


================
Comment at: include/llvm/CodeGen/TargetLowering.h:1591
+  /// no-op. e.g. a free truncate from a 64-bit to 32-bit pointer.
+  bool isFreeAddrSpaceCast(unsigned SrcAS, unsigned DestAS) const {
+    return isCheapAddrSpaceCast(SrcAS, DestAS);
----------------
Do you indent for targets to override this separately from isCheapAddrSpaceCast? You didn't make it virtual.  I'd be happy renaming Cheap to Free and just saying that, in CGP, we only sink free addrspacecasts.


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

https://reviews.llvm.org/D62409





More information about the llvm-commits mailing list