This is an archive of the discontinued LLVM Phabricator instance.

[Flang][OpenMP][MLIR] Lower OpenMP target attributes
ClosedPublic

Authored by domada on Mar 22 2023, 2:27 AM.

Details

Summary

Added functionality which allows to attach information about target features to OpenMP MLIR code.

Scope of changes:

  1. Add attribute to OpenMP MLIR dialect which stores target cpu and target features
  2. Store target information in MLIR module

Diff Detail

Event Timeline

domada created this revision.Mar 22 2023, 2:27 AM
Herald added a project: Restricted Project. · View Herald Transcript
domada requested review of this revision.Mar 22 2023, 2:27 AM
domada updated this revision to Diff 507338.Mar 22 2023, 6:29 AM
domada retitled this revision from [OpenMP][MLIR][OpenMPIRBuilder] Lower OpenMP target attributes to [Flang][OpenMP][MLIR][OpenMPIRBuilder] Lower OpenMP target attributes.
domada edited the summary of this revision. (Show Details)

Added OpenMP target attributes from parent review D145579 .

This review contains complete set of changes required to add target attributes for OpenMP dialect.

domada updated this revision to Diff 509677.Mar 30 2023, 7:43 AM
domada edited the summary of this revision. (Show Details)

Scope of changes:

  1. Applied @kiranchandramohan suggestion ( https://reviews.llvm.org/D146721 ) for target interface.
  2. Patch rebased.
  3. Limited scope of patch. Lowering from MLIR to LLVM IR will be present in different patch
domada retitled this revision from [Flang][OpenMP][MLIR][OpenMPIRBuilder] Lower OpenMP target attributes to [Flang][OpenMP][MLIR] Lower OpenMP target attributes.Mar 30 2023, 7:43 AM
domada updated this revision to Diff 509956.Mar 31 2023, 3:18 AM

Updated mlir definition of target attributes. Use MLIR class StringRefParameter instead std::string

LGTM.

mlir/include/mlir/Dialect/OpenMP/OpenMPOpsInterfaces.td
116 ↗(On Diff #509956)
128 ↗(On Diff #509956)
This revision is now accepted and ready to land.Mar 31 2023, 3:29 AM
This revision was landed with ongoing or failed builds.Mar 31 2023, 3:53 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptMar 31 2023, 3:53 AM