This is an archive of the discontinued LLVM Phabricator instance.

[AIX] Pack BasicBlockBits
ClosedPublic

Authored by daltenty on Feb 20 2020, 9:38 AM.

Details

Summary

D51664 introduces a new structure BasicBlockBits which it expects to be
packed a certain way. This change is very similar to D60164, and we apply the
same fix:

"On AIX, the canonical layout of bit-fields would cause
these ... to span four bytes. Applying the pack pragma for compilers that
employ the AIX canonical layout allows these ... to fit within the expected
two bytes. In the future, the pragma would also likely need to be applied when
building with Clang on AIX."

Diff Detail

Event Timeline

daltenty created this revision.Feb 20 2020, 9:38 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 20 2020, 9:38 AM
daltenty edited the summary of this revision. (Show Details)Feb 20 2020, 9:39 AM
sfertile accepted this revision.Feb 20 2020, 10:51 AM

Fix the formatting that Lint called out, but otherwise LGTM for fixing building natively on AIX.

Would it make sense to move the logic that defines BEGIN_TWO_BYTE_PACK and END_TWO_BYTE_PACK into cmake now that its done in more then one place?

This revision is now accepted and ready to land.Feb 20 2020, 10:51 AM
daltenty updated this revision to Diff 245695.Feb 20 2020, 11:07 AM
  • Fix formating

Would it make sense to move the logic that defines BEGIN_TWO_BYTE_PACK and END_TWO_BYTE_PACK into cmake now that its done in more then one place?

I agree, I will create that as a follow on patch.

This revision was automatically updated to reflect the committed changes.