This patch makes a few changes to unify the conversion process from the 'omp' to the 'llvm' dialect. The main goal of this change is to consolidate the logic used to identify legal and illegal ops, and to consolidate the conversion logic into a single class. Changes introduced are the following: - Removal of `getNumVariableOperands()` and `getVariableOperand()` extra class declarations from OpenMP operations. These are redundant, as they are equivalent to `mlir::Operation::getNumOperands()` and `mlir::Operation::getOperands()`, respectively. - Consolidation of `RegionOpConversion`, `RegionLessOpWithVarOperandsConversion`, `RegionOpWithVarOperandsConversion`, `RegionLessOpConversion`, `AtomicReadOpConversion`, `MapInfoOpConversion`, `DeclMapperOpConversion` and `MultiRegionOpConversion` into a single `OpenMPOpConversion` class. This is possible because all of the previous were doing parts of the same set of operations based on whether they defined any regions, whether they took operands, type attributes, etc. - Update of `mlir::configureOpenMPToLLVMConversionLegality` to use a single generic set of checks for all operations, removing the need to list every operation manually. - Update of `mlir::populateOpenMPToLLVMConversionPatterns` to automatically populate the list of patterns to include all dialect operations.
8.5 KiB
8.5 KiB