llvm-project/clang/lib
Michael Kruse 707ce34b06 [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
2021-09-02 02:37:25 -05:00
..
APINotes [clang][APINotes] Fix -Wunused-function warning (NFC) 2021-04-01 09:52:43 +08:00
ARCMigrate [clang] Introduce SourceLocation::[U]IntTy typedefs. 2021-07-21 10:45:46 +01:00
AST Fix typo in two files in Clang, patch by FusionBolt 2021-08-31 12:33:37 +05:30
ASTMatchers Reapply "Support Attr in DynTypedNode and ASTMatchers." 2021-08-06 22:30:32 +02:00
Analysis [analyzer][NFC] Display the correct function name even in crash dumps 2021-07-12 09:06:46 +02:00
Basic VFS: Document goals of 'use-external-name' and related logic, NFC 2021-09-01 15:55:33 -04:00
CodeGen [OpenMP][OpenMPIRBuilder] Implement loop unrolling. 2021-09-02 02:37:25 -05:00
CrossTU PR51018: Remove explicit conversions from SmallString to StringRef to future-proof against C++23 2021-07-08 13:37:57 -07:00
DirectoryWatcher Revert "Re-Revert "DirectoryWatcher: add an implementation for Windows"" 2021-06-19 09:19:52 -07:00
Driver [openmp] Accept directory for libomptarget-bc-path 2021-09-01 21:22:35 +01:00
Edit [Matrix] Implement C-style explicit type conversions for matrix types. 2021-04-10 11:48:41 +01:00
Format [clang-format] Add PackConstructorInitializers backward compat test 2021-08-29 13:47:11 -07:00
Frontend Revert "[CLANG][PATCH][FPEnv] Add support for option -ffp-eval-method and extend #pragma float_control similarly" 2021-09-01 04:48:50 -07:00
FrontendTool [OptTable] Rename PrintHelp to printHelp 2021-06-24 14:47:03 -07:00
Headers [OpenCL] Define OpenCL 3.0 optional core features in C++ for OpenCL 2021 2021-09-01 10:15:17 +01:00
Index [llvm][clang][NFC] updates inline licence info 2021-08-11 02:48:53 +00:00
IndexSerialization
Interpreter Revert "Reland "[clang-repl] Re-implement clang-interpreter as a test case."" 2021-09-01 08:35:33 -04:00
Lex [HeaderSearch] Use `isImport` only for imported headers and not for `#pragma once`. 2021-09-01 17:07:35 -07:00
Parse [OpenMP][OpenMPIRBuilder] Implement loop unrolling. 2021-09-02 02:37:25 -05:00
Rewrite [analyzer] Highlight arrows for currently selected event 2021-08-02 19:15:01 +03:00
Sema [OpenMP][OpenMPIRBuilder] Implement loop unrolling. 2021-09-02 02:37:25 -05:00
Serialization PR50294: Fix a performance regression from 2c9dbcd. 2021-09-01 18:00:07 -07:00
StaticAnalyzer [SystemZ][z/OS] Create html report file with text flag 2021-08-31 11:52:04 -04:00
Testing
Tooling [clang][deps] Reset non-modular language and preprocessor options 2021-08-26 08:43:21 +02:00
CMakeLists.txt [clang-repl] Recommit "Land initial infrastructure for incremental parsing" 2021-05-13 06:30:29 +00:00