[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:51:35 PDT 2019
hfinkel accepted this revision.
hfinkel added inline comments.
This revision is now accepted and ready to land.
================
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);
----------------
arsenm wrote:
> 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
Great. With that done, this LGTM.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D62409/new/
https://reviews.llvm.org/D62409
More information about the llvm-commits
mailing list