[PATCH] D117723: [NFCI] Move cost estimation from TargetLowering to TargetTransformInfo.
Daniil Fukalov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 22 03:09:27 PDT 2022
dfukalov added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.h:97
+ std::pair<InstructionCost, MVT> getTypeLegalizationCost(Type *Ty) const;
+
----------------
qianzhen wrote:
> This function used to be a public member in TargetLowering (llvm/lib/Target/AMDGPU/SIISelLowering.h), is there a reason to declare it as a private member when it's moved in TTI? It makes this function inaccessible outside TTI.
The only user of the function was TTI. Additionally this function was the last in TTL that used `InstructionCost` entity. So it was moved into TTI and became private. If one needs use the function outside of TTI it can be moved then to public section.
At the moment there are no other users of the function outside of TTI so I didn't see a reason to expose it.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D117723/new/
https://reviews.llvm.org/D117723
More information about the llvm-commits
mailing list