This is an archive of the discontinued LLVM Phabricator instance.

[CodeGen] Remove the template specialization of `Address` that stores alignment information into pointers
ClosedPublic

Authored by ahatanak on Feb 23 2023, 4:39 PM.

Details

Summary

This fixes a bug introduced in https://reviews.llvm.org/D142584. The patch reduced the number of bits used for alignment from 6 bits to 5 bits, which made it impossible to encode the maximum allowed alignment in llvm (1 << 32).

This reverts b1613f05ae0ce4efc6b6475ea4459957ebcb0150. The change was made in an attempt to reduce memory consumption by storing the alignment information into pointers, but it turns out it doesn't make much difference.

https://llvm-compile-time-tracker.com/compare.php?from=998ad085e865f2e5acc589d6bee0e3379042da2e&to=5de4a1989c474f37ac03f20ccb0aef50f6e3b854&stat=max-rss

Diff Detail

Event Timeline

ahatanak created this revision.Feb 23 2023, 4:39 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 23 2023, 4:39 PM
ahatanak requested review of this revision.Feb 23 2023, 4:39 PM

I don't have a test case for this change because there is a bug that prevents using the maximum allowed alignment (see https://github.com/llvm/llvm-project/issues/60752).

aeubanks added inline comments.Feb 23 2023, 6:14 PM
clang/lib/CodeGen/Address.h
28–29

we should remove this class altogether

ahatanak updated this revision to Diff 500222.Feb 24 2023, 8:37 AM

Remove AddressImpl altogether.

aeubanks accepted this revision.Feb 24 2023, 9:45 AM
This revision is now accepted and ready to land.Feb 24 2023, 9:45 AM
This revision was landed with ongoing or failed builds.Feb 24 2023, 10:37 AM
This revision was automatically updated to reflect the committed changes.