OSDN Git Service

TTI: Improve default costs for addrspacecast
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Mon, 3 Jun 2019 18:41:34 +0000 (18:41 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Mon, 3 Jun 2019 18:41:34 +0000 (18:41 +0000)
commita69b8271d528b248e80415df7a65e4b254c86536
treeda5f4e2fed9afbf77a826719b376b1ae933a4b75
parent327196792a52252fcc56fc4d57bdd411cc39904f
TTI: Improve default costs for addrspacecast

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362436 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/BasicTTIImpl.h
include/llvm/CodeGen/TargetLowering.h
lib/CodeGen/CodeGenPrepare.cpp
lib/Target/AMDGPU/SIISelLowering.cpp
lib/Target/AMDGPU/SIISelLowering.h
test/Analysis/CostModel/AMDGPU/addrspacecast.ll
test/Transforms/LoopUnroll/AMDGPU/unroll-cost-addrspacecast.ll [new file with mode: 0644]