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.
Details
Diff Detail
Event Timeline
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? |
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. |
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. |
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?