This is an archive of the discontinued LLVM Phabricator instance.

[Passes] Run GlobalsAA before LICM during LTO in new PM.
ClosedPublic

Authored by fhahn on May 12 2021, 11:36 AM.

Details

Summary

This patch adjusts the LTO pipeline in the new PM to run GlobalsAA
before LICM to match the legacy PM.

This fixes a regression where the new PM failed to vectorize loops that
require hoisting/sinking by LICM depending on GlobalsAA info.

Diff Detail

Event Timeline

fhahn created this revision.May 12 2021, 11:36 AM
fhahn requested review of this revision.May 12 2021, 11:36 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 12 2021, 11:36 AM
This revision is now accepted and ready to land.May 12 2021, 11:49 AM

These changes don't look related to me, can you please land them separately?

fhahn added a comment.May 13 2021, 3:57 AM

These changes don't look related to me, can you please land them separately?

Yeah, they are only loosely related through the test case, which requires both. I'll submit the MemorySSA change separately first.

fhahn updated this revision to Diff 345083.May 13 2021, 4:14 AM

Strip away memoryssa change.

fhahn retitled this revision from [Passes] Run GlobalsAA before LICM during LTO in new PM, use MSSA. to [Passes] Run GlobalsAA before LICM during LTO in new PM..May 13 2021, 4:15 AM
fhahn edited the summary of this revision. (Show Details)
This revision was landed with ongoing or failed builds.May 13 2021, 5:11 AM
This revision was automatically updated to reflect the committed changes.

Hi @fhahn,

these changes breaks the new-pm-lto-defaults.ll test on the cross win-x-arm linux cross builders:

The problem is the test expects the following pattern: Running pass: InvalidateAnalysisPass<llvm::AAManager> on foo
but it gets Running pass: InvalidateAnalysisPass<class llvm::AAManager> on foo from the input.

Would you take care of it?