For some reason multiple places need to do this, and the variant the
loop unroller and inliner use was not handling it.
Also, introduce a new wrapper to be slightly more precise, since on
AMDGPU some addrspacecasts are free, but not no-ops.
Paths
| Differential D62409
TTI: Improve default costs for addrspacecast ClosedPublic Authored by arsenm on May 24 2019, 10:04 AM.
Details
Summary For some reason multiple places need to do this, and the variant the Also, introduce a new wrapper to be slightly more precise, since on
Diff Detail Event TimelineHerald added subscribers: dmgreen, zzheng, tpr and 3 others. · View Herald TranscriptMay 24 2019, 10:04 AM
This revision is now accepted and ready to land.Jun 3 2019, 10:51 AM
Revision Contents
Diff 201281 include/llvm/CodeGen/BasicTTIImpl.h
include/llvm/CodeGen/TargetLowering.h
test/Analysis/CostModel/AMDGPU/addrspacecast.ll
test/Transforms/LoopUnroll/AMDGPU/unroll-cost-addrspacecast.ll
|
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.