This is an archive of the discontinued LLVM Phabricator instance.

[clang][OpenMP] Add codegen for allocate directive's 'align' clause
ClosedPublic

Authored by ddpagan on Dec 13 2021, 4:05 PM.

Details

Reviewers
jdoerfert
ABataev
Summary

[OpenMP] Added codegen for allocate directive's 'align' clause.

Diff Detail

Unit TestsFailed

Event Timeline

ddpagan created this revision.Dec 13 2021, 4:05 PM
ddpagan requested review of this revision.Dec 13 2021, 4:05 PM
Herald added a project: Restricted Project. · View Herald Transcript
ABataev added inline comments.Dec 14 2021, 5:24 AM
clang/lib/CodeGen/CGOpenMPRuntime.cpp
12311

I would recommend to keep Expr * here rather than Value *. Value *Allocator might be not reachable here (with exceptions, especially), better to reemit it.

ddpagan updated this revision to Diff 394649.Dec 15 2021, 1:24 PM

Thanks for catching that, Alexey. As suggested, we now keep the allocator Expr * and reemit it later when needed.

ABataev added inline comments.Dec 15 2021, 3:08 PM
llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h
980–983 ↗(On Diff #394649)

Maybe I missed something but where is the definition of this member function?

ddpagan updated this revision to Diff 395741.Dec 21 2021, 1:09 PM

Alexey, you weren't missing anything. This was an unnecessary declaration of createOMPAlignedAlloc OMPIRBuilder.h that I had forgotten to delete.

This revision is now accepted and ready to land.Dec 21 2021, 1:11 PM
ddpagan updated this revision to Diff 397395.Jan 4 2022, 2:06 PM

Fixed format problem for test/OpenMP/allocate_codegen_attr.cpp
Successfully rebased, built, and tested.

aaron.ballman closed this revision.Jan 5 2022, 9:43 AM
aaron.ballman added a subscriber: aaron.ballman.

I've commit on your behalf in 7df2371bc6518a63bdbe5f3c44bd064940808e35 (Clang) and 7df2371bc6518a63bdbe5f3c44bd064940808e35 (LLVM). Thanks!