[llvm] [TTI] Fix haveFastClmul to access inherited DL via thisT() (NFC) (PR #210647)
Mayank Solanki via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 20 00:32:36 PDT 2026
msolk wrote:
> 1. What was the error message?
`FAILED: lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/BasicTargetTransformInfo.cpp.o
llvm-project/llvm/include/llvm/CodeGen/BasicTTIImpl.h:690:12: error: ‘class llvm::TargetTransformInfoImplBase’ has no member named ‘getIndexType’
DL.getIndexType(Ty->getContext(), DL.getAllocaAddrSpace());
^~~~~~~~~~~~
llvm-project/llvm/include/llvm/CodeGen/BasicTTIImpl.h:690:46: error: ‘class llvm::TargetTransformInfoImplBase’ has no member named ‘getAllocaAddrSpace’; did you mean ‘getAssumedAddrSpace’?
DL.getIndexType(Ty->getContext(), DL.getAllocaAddrSpace());
^~~~~~~~~~~~~~~~~~
getAssumedAddrSpace`
> 2. If that's an actual bugfix, the commit message shouldn't say "NFC".
I think you are right. I added NFC as this will not change the behavior of the built compiler but will enable compiling it with older gcc versions. Shall I remove NFC?
> 3. The surrounding functions use `DL`, `thisT()->getDataLayout()` and `this->getDataLayout()`. Why these differences?
I cannot say for sure. Most likely people were not aware of the `thisT()` route. `thisT()` returns a const reference, using it should ensure that the object is not modified using the returned pointer.
https://github.com/llvm/llvm-project/pull/210647
More information about the llvm-commits
mailing list