This is an archive of the discontinued LLVM Phabricator instance.

[LoopIdiom] Set `elementtype` attribute for generated memory intrinsic if required.
Needs ReviewPublic

Authored by dantrushin on Jun 15 2022, 12:08 PM.
This revision needs review, but there are no reviewers specified.

Details

Reviewers
None
Summary

Some garbage collectors require load and/or store barriers when
reading/storing object pointers. The only way to differentiate object
pointer from scalar type of the same size when using memory intrinsics
is elementtype attribute. Set it when we created new memcpy call
in function which has GCStrategy requiring barriers.

Diff Detail