This is an archive of the discontinued LLVM Phabricator instance.

[Polly][ScopInfo] Integrate ScalarDefUseChain into polly::Scop. NFC.
ClosedPublic

Authored by Meinersbur on Jul 19 2017, 9:53 AM.

Details

Summary

Before this patch, ScalarDefUseChain was a tool used by DeLICM to find all reads and writes of scalar accesses. It iterated once over all accesses and stores the accesses into maps.

By integrating it into the Scop class, we can keep the maps up-to-date without the need for recomputing them. It will be needed for more than DeLICM in the future, such as SCoP simplification, code movement between virtual statements, and array expansion (GSoC project).

Compared to ScalarUseDefChain, we save two maps by finding the ScopStmt a Def/PHIRead must reside in, and use its already existing lookup function to find the MemoryAccess.

Diff Detail

Repository
rL LLVM

Event Timeline

Meinersbur created this revision.Jul 19 2017, 9:53 AM
grosser accepted this revision.Jul 19 2017, 9:57 AM

LGTM.

lib/Analysis/ScopInfo.cpp
4955 ↗(On Diff #107325)

Start assert statement with uppercase.

Also "can only BE used after"?

This revision is now accepted and ready to land.Jul 19 2017, 9:57 AM
This revision was automatically updated to reflect the committed changes.