Page MenuHomePhabricator

[clang-tidy] new altera unroll loops check
Needs ReviewPublic

Authored by ffrankies on Jan 5 2020, 4:09 PM.

Details

Summary

This lint check is a part of the FLOCL (FPGA Linters for OpenCL) project out of the Synergy Lab at Virginia Tech.

FLOCL is a set of lint checks aimed at FPGA developers who write code in OpenCL.

The altera unroll loops check finds inner loops that have not been unrolled, as well as fully-unrolled loops that should be partially unrolled due to unknown loop bounds or a large number of loop iterations.

Based on the Altera SDK for OpenCL: Best Practices Guide

Diff Detail

Event Timeline

ffrankies created this revision.Jan 5 2020, 4:09 PM
ffrankies updated this revision to Diff 236270.Jan 5 2020, 4:12 PM
ffrankies updated this revision to Diff 236271.Jan 5 2020, 4:15 PM

I think will be good idea to separate module code in own review or refer to previous one of previous reviews as dependency.

clang-tidy/altera/UnrollLoopsCheck.cpp
31

Could be const auto *, because type is spelled in same sentence. See modernize-use-auto.

69

May be merge declaration with initialization and use const auto *?

96

Could be const auto *, because type is spelled in same sentence.

113

Could be const auto *, because type is spelled in same sentence.

117

Could be const auto *, because type is spelled in same sentence.

121

Could be const auto *, because type is spelled in same sentence.

134

Could be const auto *, because type is spelled in same sentence.

docs/ReleaseNotes.rst
79

Please synchronize with first statement in documentation.

docs/clang-tidy/checks/altera-unroll-loops.rst
68

Please document default value.

Eugene.Zelenko set the repository for this revision to rG LLVM Github Monorepo.Jan 5 2020, 5:32 PM
Eugene.Zelenko removed a project: Restricted Project.
Herald added a project: Restricted Project. · View Herald TranscriptJan 5 2020, 5:32 PM