f18-llvm-project icon indicating copy to clipboard operation
f18-llvm-project copied to clipboard

Added OpenMP 5.0 specification based lowering of atomic read and write

Open NimishMishra opened this issue 3 years ago • 9 comments

This PR adds PFT to MLIR lowering support for atomic read and write.

NimishMishra avatar Dec 24 '21 06:12 NimishMishra

@NimishMishra Will you be able to address the changes requested by Eric and Peixin?

kiranchandramohan avatar Mar 21 '22 15:03 kiranchandramohan

@kiranchandramohan I got caught up elsewhere. I'll pick this PR on priority. I see Eric is fine with ReferenceType. I don't have any idea on HeapType, PointerType, and LLVMPointerType. Can you give some idea on which one to pick up?

NimishMishra avatar Mar 21 '22 16:03 NimishMishra

@kiranchandramohan Can we merge this?

NimishMishra avatar Mar 25 '22 13:03 NimishMishra

Except for those code style issues, the function code looks good to me.

BTW, it seems that some semantic checks are missing for atomic construct. For example, at most one hint clause can be in atomic construct, and which memory order clauses can be in which atomic construct. Not sure if they are beyond OpenMP 1.1.

PeixinQiao avatar Mar 25 '22 13:03 PeixinQiao

Except for those code style issues, the function code looks good to me.

BTW, it seems that some semantic checks are missing for atomic construct. For example, at most one hint clause can be in atomic construct, and which memory order clauses can be in which atomic construct. Not sure if they are beyond OpenMP 1.1.

I'll do the code style changes. As far as the semantic checks are concerned, I have verified that they are present in llvm main repository. I did not implement them; they were already there.

I'll take this PR on priority.

NimishMishra avatar Mar 25 '22 13:03 NimishMishra

Could you create a copy of this for upstream llvm-project as well?

Yes. I will create a upstream differential for this PR.

NimishMishra avatar Mar 29 '22 02:03 NimishMishra

@shraiysh have you reviewed this PR? If you are OK, please approve.

kiranchandramohan avatar Mar 29 '22 05:03 kiranchandramohan

Note: This PR can no longer be merged since #1570 is merged. Once we reach a consensus on https://reviews.llvm.org/D122725, I will modify this PR too to that end.

NimishMishra avatar Apr 07 '22 03:04 NimishMishra

Can you close this now and cherry-pick D122725 ?

kiranchandramohan avatar Apr 21 '22 09:04 kiranchandramohan