This is an archive of the discontinued LLVM Phabricator instance.

[BlockGenerator] Take context into account when identifying partial writes
ClosedPublic

Authored by grosser on Jun 1 2017, 12:13 AM.

Details

Summary

A partial write is a write where the domain of the values written is a subset of
the execution domain of the parent statement containing the write. Originally,
we directly checked this subset relation whereas it is indeed only important
that the subset relation holds for the parameter values that are known to be
valid in the execution context of the scop. We update our check to avoid the
unnecessary introduction of partial writes in situations where the write appears
to be partial without context information, but where context information allows
us to understand that a full write can be generated.

This change fixes (hides) a recent regression introduced in r303517, which broke
our AOSP builds. The part that is correctly fixed in this change is that we do
not any more unnecessarily generate a partial write. This is good performance
wise and, as we currently do not yet explicitly introduce partial writes in the
default configuration, this also hides possible bugs in the partial writes
implementation. The crashes that we have originally seen were caused by such
a bug, where partial writes were incorrectly generated in region statements. An
additional patch in a subsequent commit is needed to address this problem.

Reported-by: Eli Friedman <efriedma@codeaurora.org>

Diff Detail

Repository
rL LLVM

Event Timeline

grosser created this revision.Jun 1 2017, 12:13 AM
Meinersbur accepted this revision.Jun 1 2017, 2:29 AM

LGTM

You forgot to add [Polly] to the patch title (Please don't add it to the commit).

This revision is now accepted and ready to land.Jun 1 2017, 2:29 AM

Thanks, the [Polly], indeed.

This revision was automatically updated to reflect the committed changes.