This is an archive of the discontinued LLVM Phabricator instance.

[Polly][CodeGen] Support partial write accesses.
ClosedPublic

Authored by Meinersbur on May 16 2017, 1:30 PM.

Details

Summary

Allow the BlockGenerator to generate memory writes that are not defined over the complete statement domain, but only over a subset of it. It generates a condition that evaluates to 1 if executing the subdomain, and only then execute the access.

Only write accesses are supported. Read accesses would require a PHINode which has a value if the access is not executed.

Partial write makes DeLICM able to apply mappings that are not defined over the entire domain (for instance, a branch that leaves a loop with a PHINode in its header; a MemoryKind::PHI write when leaving is never read by its PHI read).

Diff Detail

Repository
rL LLVM

Event Timeline

Meinersbur created this revision.May 16 2017, 1:30 PM
grosser accepted this revision.May 18 2017, 2:50 PM
grosser added inline comments.
include/polly/ScopInfo.h
1032 ↗(On Diff #99184)

MemoryAccess

lib/CodeGen/IslNodeBuilder.cpp
794 ↗(On Diff #99184)

Why "if 0"?

This revision is now accepted and ready to land.May 18 2017, 2:50 PM
Meinersbur added inline comments.May 18 2017, 3:15 PM
lib/CodeGen/IslNodeBuilder.cpp
794 ↗(On Diff #99184)

Mmmh, I seem to have forgotten to adapt this function.

Pre-commit update

  • Address Tobias' comments
  • Support empty partial write.
This revision was automatically updated to reflect the committed changes.