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

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 3 10:42:05 PDT 2019


arsenm marked an inline comment as done.
arsenm 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);
----------------
hfinkel wrote:
> 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.
Renaming cheap to free would be fine for me


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

https://reviews.llvm.org/D62409





More information about the llvm-commits mailing list