This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP] Add fields for flags in the offload entry descriptor.
ClosedPublic

Authored by sfantao on Jan 4 2017, 9:32 AM.

Details

Summary

This patch adds two fields to the offload entry descriptor. One field is meant to signal Ctors/Dtors and link global variables, and the other is reserved for runtime library use.

Currently, these fields are only filled with zeros in the current code generation, but that will change when declare target is added.

The reason, we are adding these fields now is to make the code generation consistent with the runtime library proposal under review in https://reviews.llvm.org/D14031.

Event Timeline

sfantao updated this revision to Diff 83064.Jan 4 2017, 9:32 AM
sfantao retitled this revision from to [OpenMP] Add fields for flags in the offload entry descriptor..
sfantao updated this object.
sfantao added a subscriber: caomhin.
Hahnfeld edited edge metadata.Jan 4 2017, 11:19 PM
Hahnfeld added a subscriber: cfe-commits.

Otherwise SGTM

lib/CodeGen/CGOpenMPRuntime.h
250–252

Is that intentionally not in the protected section below?

sfantao marked an inline comment as done.Jan 5 2017, 4:49 AM

Hi Jonas,

Thanks for the review.

lib/CodeGen/CGOpenMPRuntime.h
250–252

Yes, we have a public getter/setter to interact with that, so no need to make it protected.

Hahnfeld added inline comments.Jan 5 2017, 5:01 AM
lib/CodeGen/CGOpenMPRuntime.h
250–252

Hm, Order and Kind also have public getters and are currently never set from outside - will that be required in the future?

sfantao updated this revision to Diff 83236.Jan 5 2017, 7:39 AM
sfantao marked 2 inline comments as done.
sfantao edited edge metadata.
  • Privatize Order, Flags and Kind of the offload entry.
lib/CodeGen/CGOpenMPRuntime.h
250–252

Good point, I guess those fields were being directly accessed by the child classes but now they are set through the constructor. I am privatizing the all three fields in the last diff as they don't need to be protected anymore.

Hahnfeld accepted this revision.Jan 5 2017, 7:51 AM
Hahnfeld edited edge metadata.

LGTM

This revision is now accepted and ready to land.Jan 5 2017, 7:51 AM
sfantao closed this revision.Jan 5 2017, 8:13 AM