This is an archive of the discontinued LLVM Phabricator instance.

[Polly][Simplify] Implement write accesses coalescing.
ClosedPublic

Authored by Meinersbur on Jul 28 2017, 12:02 PM.

Details

Summary

Write coalescing combines write accesses that

  • Write the same llvm::Value.
  • Write to the same array.
  • Unless they do not write anything in a statement instance (partial writes), write to the same element.
  • There is no other access between them that accesses the same element.

This is particularly useful after DeLICM, which leaves partial writes to disjoint domains.

After commit, some common code could be refactored:

  • makeValueSet() is the same principle as used by DeLICM's makeValueSet(). They could both using some common Scop infrastructure to get unique ids for llvm::Values.
  • removeOverwrites() also uses a "backwards scan over accesses". They could be merged into the same function.

Diff Detail

Repository
rL LLVM

Event Timeline

Meinersbur created this revision.Jul 28 2017, 12:02 PM
grosser accepted this revision.Jul 28 2017, 12:16 PM

Very nice!

lib/Transform/Simplify.cpp
260 ↗(On Diff #108684)

the same the value ???

290 ↗(On Diff #108684)

are can be

308 ↗(On Diff #108684)

instead OF

309 ↗(On Diff #108684)

In THE case where we ARE??? only compare

311 ↗(On Diff #108684)

HAS always

333 ↗(On Diff #108684)

for A??? compatible other write ACCESS??

Singular or plural. Please also check together with the following sentence.

384 ↗(On Diff #108684)

accessed

This revision is now accepted and ready to land.Jul 28 2017, 12:16 PM
Meinersbur marked 7 inline comments as done.
  • Adressed Tobias' review comments
  • Don't coalesce memmove/memcpy/memset
This revision was automatically updated to reflect the committed changes.