This is an archive of the discontinued LLVM Phabricator instance.

[Polly][ForwardOpTree] Use known array content analysis to forward load instruction.
ClosedPublic

Authored by Meinersbur on Aug 6 2017, 10:49 AM.

Details

Summary

This is an addition to the -polly-optree pass that reuses the array content analysis from DeLICM to find array elements that contain the same value as the value loaded when the target statement instance is executed.

The analysis is enabled by default -polly-position=before-vectorizer.

The known content analysis could also be used to rematerialize any llvm::Value that was written to some array element, but currently only loads are forwarded.

Diff Detail

Repository
rL LLVM

Event Timeline

Meinersbur created this revision.Aug 6 2017, 10:49 AM
grosser accepted this revision.Aug 6 2017, 11:27 AM

LGTM.

include/polly/ZoneAlgo.h
83 ↗(On Diff #109929)

Two whitespaces at the beginning of the line?

lib/Support/RegisterPasses.cpp
77 ↗(On Diff #109929)

I think we should enable this always. I suggest to remove this change.

lib/Transform/ForwardOpTree.cpp
37 ↗(On Diff #109929)

We should always have it on, to make sure it is tested.

210 ↗(On Diff #109929)

THAT contain the same value

289 ↗(On Diff #109929)

Maybe align with the start of the descriptions?

This revision is now accepted and ready to land.Aug 6 2017, 11:27 AM
  • Rebase to r310236
  • polly-optree-analyze-known by default + use isl++
  • Address Tobias' comment
  • Add translator to make newly added loads reuse previous known values analysis
This revision was automatically updated to reflect the committed changes.