[PATCH] D116875: [clang-tidy] Add performance-inefficient-array-traversal check
Eugene Zelenko via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Jan 9 06:39:47 PST 2022
Eugene.Zelenko added inline comments.
================
Comment at: clang-tools-extra/clang-tidy/performance/InefficientArrayTraversalCheck.cpp:63
+ hasLHS(ToDecl),
+ hasRHS(integerLiteral(equals(1)))))),
+ hasBody(BodyMatcher))
----------------
njames93 wrote:
> Thoughts on this, prefetchers are often able to detect strided access so is forcing increment to be `1` removing potential functionality.
Theoretically index changes may be other than 1. For example, in some electronic simulation each block/device store matrix indexes to contribute (but sparse, not dense, matrix is used). It'll be good idea to look on BLAS and LAPACK (through both are written in Fortran).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D116875/new/
https://reviews.llvm.org/D116875
More information about the cfe-commits
mailing list