This is an archive of the discontinued LLVM Phabricator instance.

[MS] Pass aligned, non-trivially copyable things indirectly on x86
AbandonedPublic

Authored by rnk on Feb 11 2020, 5:36 PM.

Details

Summary

This is a follow-up to case 1 in D72114.

The C++ argument classification logic supersedes the C rules, so we have
to add a second check for overaligned records in the C++ argument
classification logic. Otherwise, clang will pass such records using
inalloca.

This has the interesting consequence of making it possible to opt a
record out of inalloca by adding a trivial alignment requirement
(alignas(void*, uint64_t)) to the record.

Fixes the last known corner case to PR44395

Diff Detail

Event Timeline

rnk created this revision.Feb 11 2020, 5:36 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 11 2020, 5:36 PM
rnk updated this revision to Diff 245491.Feb 19 2020, 12:47 PM
  • rebase
rnk abandoned this revision.Sep 24 2020, 1:21 PM

I actually forgot about this change entirely and uploaded and landed a new one:
https://reviews.llvm.org/D87923

I suppose they are functionally different: if we have an overaligned type that can be passed in registers due to [[trivial_abi]], we should do that.