This is an archive of the discontinued LLVM Phabricator instance.

[Attributor] Deduce load/store alignment only in CGSCC passes
AbandonedPublic

Authored by jdoerfert on Apr 15 2020, 9:44 PM.

Details

Summary

Load & store alignment is used mostly late. Since the module pass is run
early and the CGSCC pass is run late we wait for the latter to derive
them. This mainly avoids redundant duplication in case we fail.

This is a compile-time reduction patch and it is unclear if we want to
introduce such switches. Though I feel we might need more of them.

Diff Detail

Event Timeline

jdoerfert created this revision.Apr 15 2020, 9:44 PM
Herald added a reviewer: uenoku. · View Herald Transcript
Herald added a project: Restricted Project. · View Herald Transcript

I think this needs some PhaseOrdering test, to show that whatever we expect to make use of this data actually can do so.

nikic added a subscriber: nikic.Apr 17 2020, 12:37 AM

Sorry for hijacking: Do you have any more information on where we make use of alignment information? Is it just in the backend, or also before that? (I'm wondering because one of the most expensive parts of InstCombine is known bits based alignment computation, maybe that should be moved from there into something like CGP, if it's not actually needed early...)

I do not have the information but we should ask and test for it. As with instcombine we (might be able to) save compile time doing it (only) late.

jdoerfert abandoned this revision.Oct 10 2020, 7:45 AM

This was a poor attempt to reduce compile time. We need to tackle that more structured eventually.