This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP] Add support for mapping array sections through pointer references.
ClosedPublic

Authored by sfantao on Jul 22 2016, 11:05 AM.

Details

Summary

This patch fixes a bug in the map of array sections whose base is a reference to a pointer. The existing mapping support was not prepared to deal with it, causing the compiler to crash.

Mapping a reference to a pointer enjoys the same characteristics of a regular pointer, i.e., it is passed by value. Therefore, the reference has to be materialized in the target region.

Diff Detail

Event Timeline

sfantao updated this revision to Diff 65104.Jul 22 2016, 11:05 AM
sfantao retitled this revision from to [OpenMP] Add support for mapping array sections through pointer references..
sfantao updated this object.
sfantao added subscribers: cfe-commits, caomhin.
ABataev accepted this revision.Jul 24 2016, 8:33 PM
ABataev edited edge metadata.

LG with a nit

lib/CodeGen/CGOpenMPRuntime.cpp
5280

getAs -> castAs

This revision is now accepted and ready to land.Jul 24 2016, 8:33 PM
sfantao updated this revision to Diff 65751.Jul 27 2016, 8:45 AM
sfantao marked an inline comment as done.
sfantao edited edge metadata.
  • Use castAs instead of getAs in pointer type.
sfantao closed this revision.Jul 27 2016, 3:57 PM