forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Flang][OpenMP][MLIR][Lower] Update lowering to use wrapper ops
This patch introduces the following changes: - Complete OpenMP directive sets to include masked and taskloop-related ones. - Refactor clause processing to store related operands in structures. These are combined into construct-specific operand structures using a mixin pattern and simplify keeping track of operand lists used for creating OpenMP operations and reduces argument lists. - Update the lowering to MLIR of loop constructs to follow the wrapper + canonical loop approach. This includes some changes to privatization that need testing. - Add lowering for the omp.canonical_loop operation, based on omp.wsloop. - Significant refactor of OpenMP construct lowering, separating composite constructs into their own "gen" functions and handling combined loop constructs in a more scalable way. Updated genOMP functions to follow the same set of patterns to make it more understandable. Split clause processing calls from code generation for operations in preparation for reusing the same code when dealing with composite constructs. - Add basic support for taskloop, for completeness sake. - Document missing clauses. - Move some code from OpenMP.cpp to ClauseProcessor.cpp and call it there to simplify calls to certain process methods that were always followed by the same post-processing. - Add and populate "composite" attribute on wrapper operations. - Add empty constructors for wrapper operations. - Update `LoopWrapperInterface` to avoid compilation problems. - Update `Task*` operation's names to follow the same capitalization convention. - Changes to SCF to OpenMP conversion to produce a wrapper omp.wsloop with a nested omp.canonical_loop rather than an invalid omp.wsloop. - Document missing verifier checks on wrapper operations. - Make temporary changes to OpenMP to LLVM IR translation to make this compilable. All these changes are still WIP, as they haven't been tested.
- Loading branch information
Showing
17 changed files
with
2,503 additions
and
1,775 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.