This is an archive of the discontinued LLVM Phabricator instance.

[mlir][OpenMP] Added omp.atomic.write lowering to LLVM IR
ClosedPublic

Authored by shraiysh on Dec 30 2021, 8:52 AM.

Details

Summary

This patch adds omp.atomic.write lowering to LLVM IR.
Also, changed the syntax to have equal symbol instead of the comma to
make it more intuitive.

Diff Detail

Event Timeline

shraiysh created this revision.Dec 30 2021, 8:52 AM
shraiysh requested review of this revision.Dec 30 2021, 8:52 AM

Look OK. Have a few nit comments.

mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
926

Nit: Use similar case style for AO (we have used ao above).

929

Nit: Can you add comments for the two false fields?

mlir/test/Target/LLVMIR/openmp-llvm.mlir
755

Nit: Remove the debug check.

shraiysh updated this revision to Diff 397517.Jan 5 2022, 4:09 AM

Thanks for the review @kiranchandramohan. Addressed comments.

shraiysh marked 3 inline comments as done.Jan 5 2022, 4:10 AM
This revision is now accepted and ready to land.Jan 5 2022, 7:05 AM
peixin accepted this revision.Jan 6 2022, 12:56 AM

LGTM.

mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
931

forget to change this AO to ao?

mlir/test/Target/LLVMIR/openmp-llvm.mlir
756

What will be generated in IR for hint clause?

shraiysh updated this revision to Diff 398042.Jan 6 2022, 8:16 PM
shraiysh marked 2 inline comments as done.

Thanks for the review @kiranchandramohan and @peixin. Addressed comments and rebase with main.

shraiysh added inline comments.Jan 6 2022, 8:28 PM
mlir/test/Target/LLVMIR/openmp-llvm.mlir
756

Hint clause is ignored at the moment - removed the testcase.

This revision was automatically updated to reflect the committed changes.