forked from OSchip/llvm-project
707ce34b06
Add methods for loop unrolling to the OpenMPIRBuilder class and use them in Clang if `-fopenmp-enable-irbuilder` is enabled. The unrolling methods are: * `unrollLoopFull` * `unrollLoopPartial` * `unrollLoopHeuristic` `unrollLoopPartial` and `unrollLoopHeuristic` can use compiler heuristics to automatically determine the unroll factor. If possible, that is if no CanonicalLoopInfo is required to pass to another method, metadata for LLVM's LoopUnrollPass is added. Otherwise the unroll factor is determined using the same heurstics as user by LoopUnrollPass. Not requiring a CanonicalLoopInfo, especially with `unrollLoopHeuristic` allows greater flexibility. With full unrolling and partial unrolling with known unroll factor, instead of duplicating instructions by the OpenMPIRBuilder, the full unroll is still delegated to the LoopUnrollPass. In case of partial unrolling the loop is first tiled using the existing `tileLoops` methods, then the inner loop fully unrolled using the same mechanism. Reviewed By: jdoerfert, kiranchandramohan Differential Revision: https://reviews.llvm.org/D107764 |
||
---|---|---|
.. | ||
APINotes | ||
ARCMigrate | ||
AST | ||
ASTMatchers | ||
Analysis | ||
Basic | ||
CodeGen | ||
CrossTU | ||
DirectoryWatcher | ||
Driver | ||
Edit | ||
Format | ||
Frontend | ||
FrontendTool | ||
Headers | ||
Index | ||
IndexSerialization | ||
Interpreter | ||
Lex | ||
Parse | ||
Rewrite | ||
Sema | ||
Serialization | ||
StaticAnalyzer | ||
Testing | ||
Tooling | ||
CMakeLists.txt |