clang-tools 22.0.0git
clang::tidy::altera::UnrollLoopsCheck Class Reference

Finds inner loops that have not been unrolled, as well as fully unrolled loops with unknown loop bounds or a large number of iterations. More...

#include <UnrollLoopsCheck.h>

Inheritance diagram for clang::tidy::altera::UnrollLoopsCheck:
[legend]

Public Member Functions

 UnrollLoopsCheck (StringRef Name, ClangTidyContext *Context)
void registerMatchers (ast_matchers::MatchFinder *Finder) override
void check (const ast_matchers::MatchFinder::MatchResult &Result) override

Detailed Description

Finds inner loops that have not been unrolled, as well as fully unrolled loops with unknown loop bounds or a large number of iterations.

Unrolling inner loops could improve the performance of OpenCL kernels. However, if they have unknown loop bounds or a large number of iterations, they cannot be fully unrolled, and should be partially unrolled.

For the user-facing documentation see: https://clang.llvm.org/extra/clang-tidy/checks/altera/unroll-loops.html

Definition at line 25 of file UnrollLoopsCheck.h.

Constructor & Destructor Documentation

◆ UnrollLoopsCheck()

clang::tidy::altera::UnrollLoopsCheck::UnrollLoopsCheck ( StringRef Name,
ClangTidyContext * Context )

Definition at line 22 of file UnrollLoopsCheck.cpp.

Member Function Documentation

◆ check()

void clang::tidy::altera::UnrollLoopsCheck::check ( const ast_matchers::MatchFinder::MatchResult & Result)
override

Definition at line 37 of file UnrollLoopsCheck.cpp.

◆ registerMatchers()

void clang::tidy::altera::UnrollLoopsCheck::registerMatchers ( ast_matchers::MatchFinder * Finder)
override

Definition at line 26 of file UnrollLoopsCheck.cpp.


The documentation for this class was generated from the following files: