This is an archive of the discontinued LLVM Phabricator instance.

[Polly] Unique value write accesses
ClosedPublic

Authored by Meinersbur on Dec 13 2015, 4:40 PM.

Details

Summary

Ensure there is at most one write access per definition of an llvm::Value. Keep track of already created value write access by using a (dense) map.

Replace addValueWriteAccess by ensureValueStore which can be uses more liberally without worrying to add redundant accesses. It will be used, e.g. in a logical correspondant for value reads -- ensureValueReload -- to ensure that the expected definition has been written when loading it.

This is was originally part of D13762.

Diff Detail

Repository
rL LLVM

Event Timeline

Meinersbur updated this revision to Diff 42676.Dec 13 2015, 4:40 PM
Meinersbur retitled this revision from to [Polly] Unique value write accesses.
Meinersbur updated this object.
Meinersbur added reviewers: grosser, jdoerfert.
Meinersbur added a project: Restricted Project.
Meinersbur added subscribers: llvm-commits, pollydev.
Meinersbur updated this object.

Rebase to D13676

grosser edited edge metadata.Dec 16 2015, 8:38 AM

Hi Michael,

again a small self-contained patch with minimal test-case noise. Nice!

From my side this patch looks good. Not only does it remove the redundant loads, but it also adds a mapping that will allow us to retrieve the scalar value writes of a scop statement, in case this functionality is needed later. This addresses Johannes concerns of us loosing parts of the Instruction->MemAccess mapping for value writes (and assuming we add such maps for other scalar accesses also in general).

Let's discuss this at the phone call tonight, but from my side this is commit ready.

include/polly/ScopInfo.h
995 ↗(On Diff #42752)

... or not existing.

lib/Analysis/ScopInfo.cpp
3948 ↗(On Diff #42752)

Unrelated. Please commit ahead of time.

One more comment:

lib/Analysis/ScopInfo.cpp
3933 ↗(On Diff #42752)

I would prefer the name 'ensureValueWrite' as this corresponds better with the WRITE/READ naming scheme used in the surrounding code.

grosser accepted this revision.Dec 18 2015, 2:38 AM
grosser edited edge metadata.

Accepted if my comments are addressed.

This revision is now accepted and ready to land.Dec 18 2015, 2:38 AM
Meinersbur updated this revision to Diff 43335.Dec 20 2015, 9:35 AM
Meinersbur edited edge metadata.
Meinersbur marked 3 inline comments as done.

Addressed Tobias' comments

This revision was automatically updated to reflect the committed changes.