llvm-project
e0c1e23b - [TTI] Constify BasicTTIImplBase::thisT() (NFCI) (#136575)

Commit
264 days ago
[TTI] Constify BasicTTIImplBase::thisT() (NFCI) (#136575) The main change is making `thisT` method `const`, the rest of the changes is fixing compilation errors (*). (*) There are two tricky methods, `getVectorInstrCost()` and `getIntImmCost()`. They have several overloads; some of these overloads are typically pulled in to derived classes using the `using` directive, and then hidden by methods in the derived class. The compiler does not complain if the hiding methods are not marked as `const`, which means that clients will use the methods from the base class. If after this change your target fails cost model tests, this must be the reason. To resolve the issue you need to make all hiding overloads `const`. See the second commit in this PR. Pull Request: https://github.com/llvm/llvm-project/pull/136575
Author
Parents
Loading