This is an archive of the discontinued LLVM Phabricator instance.

[Clang] Allow the combination of loader_uninitialized and address spaces
ClosedPublic

Authored by jdoerfert on Apr 21 2021, 12:33 AM.

Details

Summary

When an object is allocated in a non-default address space we do not
need to check for a constructor if it is not initialized and has a
trivial constructor (which we won't call then).

Diff Detail

Event Timeline

jdoerfert created this revision.Apr 21 2021, 12:33 AM
jdoerfert requested review of this revision.Apr 21 2021, 12:33 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 21 2021, 12:33 AM
JonChesterfield accepted this revision.Apr 21 2021, 3:53 AM

I misread this as implying loaded_uninitialized for addrspace globals, but actually it's a straightforward oversight from the original implementation. Thanks!

clang/test/CodeGen/attr-loader-uninitialized.c
21

addrspace(0) presumably works the same way. Iirc addrspace(0) is different from no addrspace specified.

This revision is now accepted and ready to land.Apr 21 2021, 3:53 AM
This revision was landed with ongoing or failed builds.Apr 23 2021, 9:22 AM
This revision was automatically updated to reflect the committed changes.
JonChesterfield added a comment.EditedApr 23 2021, 9:22 AM

Diff now shows unrelated changed (// C++ for OpenCL v1.0 s2.4:....), maybe needs to be rebased?
edit: commit itself looks clean, think we're good