This is an archive of the discontinued LLVM Phabricator instance.

Implement IRGen for the x86 vectorcall convention
ClosedPublic

Authored by rnk on Oct 31 2014, 1:12 PM.

Details

Summary

The most complex aspect of the convention is the handling of homogeneous
vector and floating point aggregates. Reuse the homogeneous aggregate
classification code that we use on PPC64 and ARM for this.

This convention also has a C mangling, and we apparently implement that
in both Clang and LLVM.

Diff Detail

Repository
rL LLVM

Event Timeline

rnk updated this revision to Diff 15641.Oct 31 2014, 1:12 PM
rnk retitled this revision from to Implement IRGen for the x86 vectorcall convention.
rnk updated this object.
rnk added a reviewer: majnemer.
rnk added a subscriber: Unknown Object (MLST).
majnemer accepted this revision.Oct 31 2014, 1:35 PM
majnemer edited edge metadata.

Please include a test for misshapen vector types, LGTM with changes in mind.

It would also be nice to include tests for empty non-virtual bases and zero-length bitfields.
Also, tests for over, and under, aligned fields would be nice as well.

lib/CodeGen/TargetInfo.cpp
2935 ↗(On Diff #15641)

This should be:
getContext().toCharUnitsFromBits(Info.Align).getQuantity()

3004–3005 ↗(On Diff #15641)

This comment doesn't seem to be correct for the ternary expression.

This revision is now accepted and ready to land.Oct 31 2014, 1:35 PM
rnk added a comment.Oct 31 2014, 2:57 PM

I added a bunch of test cases, but I haven't gone nuts with alignment attributes and packing pragmas yet. I think this is good enough for now.

lib/CodeGen/TargetInfo.cpp
2935 ↗(On Diff #15641)

Grumble grumble bytes are eight bits.

3004–3005 ↗(On Diff #15641)

thanks

rnk closed this revision.Oct 31 2014, 3:11 PM
rnk updated this revision to Diff 15655.

Closed by commit rL221006 (authored by @rnk).