This is an archive of the discontinued LLVM Phabricator instance.

[mlir][OpenMP] Add nontemporal clause definition to simd construct
ClosedPublic

Authored by domada on Dec 22 2022, 6:55 AM.

Details

Summary

simd nontemporal construct is represented as a list of variables which have low locality accross simd iterations.

Added verifier of nontemporal clause. MLIR tests were updated to test correctness of MLIR definition of nontemporal clause.

Diff Detail

Event Timeline

domada created this revision.Dec 22 2022, 6:55 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald Transcript
domada requested review of this revision.Dec 22 2022, 6:55 AM

Thanks for this patch. Have a question regarding the custom printer/parser.

mlir/include/mlir/Dialect/OpenMP/OpenMPOps.td
398
439

Why do we need a custom printer or parser? I see that the Flush op takes in a Variadic<OpenMP_PointerLikeType> and does not need a custom one.

domada updated this revision to Diff 487379.Jan 9 2023, 4:14 AM
domada edited the summary of this revision. (Show Details)

Applied remarks - removed custom parser and printer of nontemporal clause.

domada marked 2 inline comments as done.Jan 9 2023, 4:25 AM
domada added inline comments.
mlir/include/mlir/Dialect/OpenMP/OpenMPOps.td
439

Hi Kiran,
thanks for your review. I added custom parser and printer of nontemporal clause in the first patch, because I wanted to obtain similar format to other OpenMP clauses.

The format of the nontemporal clause was as follows:
nontemporal (var1 : type_of_var1, var2 :type_of_var2)

Without custom parser and printer the format is as follows:
nontemporal (var1, var2 : type_of_var1, type_of_var2)

Please let me know if the new format is ok for you.

LGTM. The new format looks OK. The earlier one is probably more readable. At some point we will have to look into whether we can make all of this uniform. Hopefully, at that point there will be support for interleaving operands and types in a list (assuming this is not already there, have you checked?).

This revision is now accepted and ready to land.Jan 17 2023, 3:21 AM
This revision was automatically updated to reflect the committed changes.
domada marked an inline comment as done.