[PATCH] D116875: [clang-tidy] Add performance-inefficient-array-traversal check

Nathan James via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Jan 8 19:43:47 PST 2022


njames93 created this revision.
njames93 added reviewers: alexfh, aaron.ballman.
Herald added subscribers: carlosgalvezp, kristof.beyls, xazax.hun, mgorny.
njames93 requested review of this revision.
Herald added a project: clang-tools-extra.
Herald added a subscriber: cfe-commits.

Adds a check that detects 2D array traversals where the array is traversed column wise instead of row wise.
These patterns harm cache performance as well as prevent auto-vectorisation opportunities.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D116875

Files:
  clang-tools-extra/clang-tidy/performance/CMakeLists.txt
  clang-tools-extra/clang-tidy/performance/InefficientArrayTraversalCheck.cpp
  clang-tools-extra/clang-tidy/performance/InefficientArrayTraversalCheck.h
  clang-tools-extra/clang-tidy/performance/PerformanceTidyModule.cpp
  clang-tools-extra/docs/ReleaseNotes.rst
  clang-tools-extra/docs/clang-tidy/checks/list.rst
  clang-tools-extra/docs/clang-tidy/checks/performance-inefficient-array-traversal.rst
  clang-tools-extra/test/clang-tidy/checkers/performance-inefficient-array-traversal.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D116875.398387.patch
Type: text/x-patch
Size: 12983 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220109/e14e0bb2/attachment.bin>


More information about the cfe-commits mailing list