This is an archive of the discontinued LLVM Phabricator instance.

[Polly] Model scalar dependences to avoid trivial statements
AbandonedPublic

Authored by jdoerfert on Feb 6 2015, 1:29 PM.

Details

Summary
In case a statement might be trivial but contains a scalar dependence
to an instruction outside the SCoP we need to model this scalar
dependence even though the instruction or the user can be synthesized.

Added testcase modeled after ClamAV/clamscan.

Diff Detail

Event Timeline

jdoerfert updated this revision to Diff 19509.Feb 6 2015, 1:29 PM
jdoerfert retitled this revision from to [Polly] Model scalar dependences to avoid trivial statements.
jdoerfert updated this object.
jdoerfert added subscribers: Restricted Project, Unknown Object (MLST).
grosser edited edge metadata.Feb 9 2015, 1:27 PM

Hi Johannes,

the patch looks good in general. Some minor comments.

Tobias

lib/Analysis/TempScopInfo.cpp
150

I don't really understand why scalar dependences to uses outside of the scop region only need to be modelled for otherwise trivial basic blocks. Should we not model them in general?

172

Would it make sense to make this an early return?

if (!R->contains(UseParent)) {
  AnyCrossStmtUse = true;
  continue;
}
177

Is this condition not implied by the condition below?

jdoerfert added inline comments.Feb 9 2015, 5:29 PM
lib/Analysis/TempScopInfo.cpp
150

Maybe,... I'll think about it.

[Later I wanted to model the write only for the last iteration of the domain if there is no other scalar dependence for that instruction]

172

Sure.

177

canSynthesizeInst is not equal to canSynthesize(UI,...), at least I don't have a good reason why it should be.

grosser added inline comments.Feb 9 2015, 10:22 PM
lib/Analysis/TempScopInfo.cpp
150

OK, I would be interested in the outcome of your thoughts. ;-)

[Why would you want to only model the last write? What would be the benefit?]

177

Right. That's fine than.

jdoerfert abandoned this revision.Feb 11 2015, 9:04 AM

I addressed your comments and commited it with a extended test case in r228847.

lib/Analysis/TempScopInfo.cpp
150

Your right, we need to model all accesses as we would allow reordering otherwise.