This is an archive of the discontinued LLVM Phabricator instance.

[clang][modules] Over-align the `Module` class
ClosedPublic

Authored by jansvoboda11 on Sep 26 2022, 9:40 AM.

Details

Summary

This makes llvm::PointerIntPair<Module *, 3> from f35230ae work across platforms.

Diff Detail

Event Timeline

jansvoboda11 created this revision.Sep 26 2022, 9:40 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 26 2022, 9:40 AM
Herald added a subscriber: ributzka. · View Herald Transcript
jansvoboda11 requested review of this revision.Sep 26 2022, 9:40 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 26 2022, 9:40 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
srj added a comment.EditedSep 26 2022, 10:00 AM

How did the original change pass presubmit testing -- is LLVM no longer testing on 32-bit targets?

EDIT: I ask because (presumably) the original change was able to land without triggering any failures, so I'd like to know how we're going to vet this change to ensure it fixes the issue.

Pre-commit CI only runs on x64 Debian and x64 Windows. I don't have good way to reproduce the issue, so ideally the person who reported it (@ms178?) steps up.

srj added inline comments.Sep 26 2022, 10:18 AM
clang/include/clang/Basic/Module.h
96–98

Probably worth a comment here, it's not necessarily obvious to the reader that this is to fix a 32-bit pointer issue.

srj added a comment.Sep 26 2022, 10:20 AM

Pre-commit CI only runs on x64 Debian and x64 Windows. I don't have good way to reproduce the issue, so ideally the person who reported it (@ms178?) steps up.

I'm the one who reported the breakage.

Regarding presubmit testing, that's of great concern to me; if LLVM isn't testing on x86-32 then it's not really *supporting* x86-32 anymore (as a compilation host anyway), and that's a rather large change to make without warning. Do you know to whom I should escalate that concern?

srj added a comment.Sep 26 2022, 10:26 AM

Pre-commit CI only runs on x64 Debian and x64 Windows. I don't have good way to reproduce the issue, so ideally the person who reported it (@ms178?) steps up.

FYI, adding this patch to my local build does allow me to *compile* properly now. I haven't tested for correctness.

Document reason for alignas.

jansvoboda11 marked an inline comment as done.Sep 26 2022, 10:35 AM

FYI, adding this patch to my local build does allow me to *compile* properly now. I haven't tested for correctness.

Thanks for verifying the build. You can test for correctness by "building" the check-clang target.

Regarding presubmit testing, that's of great concern to me; if LLVM isn't testing on x86-32 then it's not really *supporting* x86-32 anymore (as a compilation host anyway), and that's a rather large change to make without warning. Do you know to whom I should escalate that concern?

You can contact the infrastructure working group. Note that we run more configurations post-commit: https://lab.llvm.org/buildbot/#/console

srj added a comment.Sep 26 2022, 10:39 AM

Thanks for verifying the build. You can test for correctness by "building" the check-clang target.

Thanks -- I'll also build and test Halide locally.

You can contact the infrastructure working group. Note that we run more configurations post-commit: https://lab.llvm.org/buildbot/#/console

I opened a question at https://discourse.llvm.org/t/x86-32-bit-testing/65480 on Friday but got no responses. Is there a better venue for asking the right people?

srj added a comment.Sep 26 2022, 10:52 AM

Thanks for verifying the build. You can test for correctness by "building" the check-clang target.

Tests are passing locally, LGTM

srj accepted this revision.Sep 26 2022, 10:52 AM
This revision is now accepted and ready to land.Sep 26 2022, 10:52 AM

I opened a question at https://discourse.llvm.org/t/x86-32-bit-testing/65480 on Friday but got no responses. Is there a better venue for asking the right people?

That's what I would do, I'm not aware of better place to raise this.

Tests are passing locally, LGTM

Thank you for confirming the fix!

This revision was landed with ongoing or failed builds.Sep 26 2022, 10:55 AM
This revision was automatically updated to reflect the committed changes.