[PATCH] [Polly] Model scalar dependences to avoid trivial statements

Johannes Doerfert doerfert at cs.uni-saarland.de
Mon Feb 9 17:30:09 PST 2015


================
Comment at: lib/Analysis/TempScopInfo.cpp:150
@@ -147,1 +149,3 @@
+  bool canSynthesizeInst = canSynthesize(Inst, LI, SE, R);
+  if (canSynthesizeInst && !Functions.empty())
     return false;
----------------
grosser wrote:
> 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?
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]

================
Comment at: lib/Analysis/TempScopInfo.cpp:172
@@ +171,3 @@
+    // Check whether or not the use is in the SCoP.
+    bool inRegion = R->contains(UseParent);
+
----------------
grosser wrote:
> Would it make sense to make this an early return?
> ```
> if (!R->contains(UseParent)) {
>   AnyCrossStmtUse = true;
>   continue;
> }
> ```
Sure.

================
Comment at: lib/Analysis/TempScopInfo.cpp:177
@@ +176,3 @@
+    if (inRegion && canSynthesizeInst)
+      continue;
+
----------------
grosser wrote:
> Is this condition not implied by the condition below?
canSynthesizeInst is not equal to canSynthesize(UI,...), at least I don't have a good reason why it should be.

http://reviews.llvm.org/D7473

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list