This is an archive of the discontinued LLVM Phabricator instance.

[C++4OpenCL] Initialize temporaries in the private address space

Authored by olestrohm on Aug 5 2021, 4:08 AM.



This patch fixes initializing temporaries, which are currently initialized without an address space, meaning that no constructor can ever be applicable.
This is also working towards putting temporaries in the private address space.

Fixes the second issue in PR43296.

Diff Detail

Event Timeline

olestrohm created this revision.Aug 5 2021, 4:08 AM
olestrohm requested review of this revision.Aug 5 2021, 4:08 AM
Anastasia added inline comments.Aug 6 2021, 9:05 AM

I wonder if we should instead change the check:


into an assert?

I also wonder if it makes sense to assert that if it has an address space it should be private?

olestrohm updated this revision to Diff 367455.Aug 19 2021, 4:36 AM

I made the check into an assert as suggested.

Anastasia accepted this revision.Aug 23 2021, 2:39 AM

LGTM! Thanks

This revision is now accepted and ready to land.Aug 23 2021, 2:39 AM