aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorMichael Kruse <llvm-project@meinersbur.de>2021-09-02 01:08:55 -0500
committerMichael Kruse <llvm-project@meinersbur.de>2021-09-02 02:37:25 -0500
commit707ce34b06190e275572c3c46843036db1bab6d1 (patch)
tree8ee70867e18172fa726b524e9a665f3822bdc72b /clang/lib/Frontend/CompilerInvocation.cpp
parent3e60d216a4829a0e9a5045afa3e060f89ea18b04 (diff)
downloadllvm-707ce34b06190e275572c3c46843036db1bab6d1.zip
llvm-707ce34b06190e275572c3c46843036db1bab6d1.tar.gz
llvm-707ce34b06190e275572c3c46843036db1bab6d1.tar.bz2
[OpenMP][OpenMPIRBuilder] Implement loop unrolling.
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
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions