This is an archive of the discontinued LLVM Phabricator instance.

[IRBuilder] Only emit alias scop metadata for arrays, but not scalars
ClosedPublic

Authored by grosser on Aug 22 2017, 2:42 PM.

Details

Summary

There is no need to emit alias metadata for scalars, as basicaa will easily
distinguish them from arrays. This reduces the size of the metadata we generate.
This is especially useful after we moved to -polly-position=before-vectorizer,
where a lot more scalar dependences are introduced, which increased the size of
the alias analysis metadata and made us commonly reach the limits after which
we do not emit alias metadata that have been introduced to prevent quadratic
growth of this alias metadata.

Diff Detail

Repository
rL LLVM

Event Timeline

grosser created this revision.Aug 22 2017, 2:42 PM
Meinersbur accepted this revision.Aug 22 2017, 2:50 PM

LGTM!

lib/CodeGen/IRBuilder.cpp
65 ↗(On Diff #112230)

[Suggestion] SmallVector and/or reserve()?

67 ↗(On Diff #112230)

[Followup] Is it easily possible to determine whether there are uses of this Array left in the SCoP (e.g. MaximalStaticExpander would remove all uses of an array and replace it to another; no need to generate metadata for the old one)

This revision is now accepted and ready to land.Aug 22 2017, 2:50 PM
This revision was automatically updated to reflect the committed changes.