[polly] r185590 - scop detection: early return

Sebastian Pop spop at codeaurora.org
Wed Jul 3 15:50:36 PDT 2013


Author: spop
Date: Wed Jul  3 17:50:36 2013
New Revision: 185590

URL: http://llvm.org/viewvc/llvm-project?rev=185590&view=rev
Log:
scop detection: early return

to reduce indentation level
No functionality changed.

Modified:
    polly/trunk/lib/Analysis/ScopDetection.cpp

Modified: polly/trunk/lib/Analysis/ScopDetection.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Analysis/ScopDetection.cpp?rev=185590&r1=185589&r2=185590&view=diff
==============================================================================
--- polly/trunk/lib/Analysis/ScopDetection.cpp (original)
+++ polly/trunk/lib/Analysis/ScopDetection.cpp Wed Jul  3 17:50:36 2013
@@ -276,53 +276,54 @@ bool ScopDetection::isValidMemoryAccess(
   if (isa<IntToPtrInst>(BaseValue))
     INVALID(Other, "Find bad intToptr prt: " << *BaseValue);
 
-  if (!IgnoreAliasing) {
-    // Check if the base pointer of the memory access does alias with
-    // any other pointer. This cannot be handled at the moment.
-    AliasSet &AS = Context.AST
-        .getAliasSetForPointer(BaseValue, AliasAnalysis::UnknownSize,
-                               Inst.getMetadata(LLVMContext::MD_tbaa));
-
-    // INVALID triggers an assertion in verifying mode, if it detects that a
-    // SCoP was detected by SCoP detection and that this SCoP was invalidated by
-    // a pass that stated it would preserve the SCoPs. We disable this check as
-    // the independent blocks pass may create memory references which seem to
-    // alias, if -basicaa is not available. They actually do not, but as we can
-    // not proof this without -basicaa we would fail. We disable this check to
-    // not cause irrelevant verification failures.
-    if (!AS.isMustAlias()) {
-      std::string Message;
-      raw_string_ostream OS(Message);
-
-      OS << "Possible aliasing: ";
-
-      std::vector<Value *> Pointers;
-
-      for (AliasSet::iterator AI = AS.begin(), AE = AS.end(); AI != AE; ++AI)
-        Pointers.push_back(AI.getPointer());
-
-      std::sort(Pointers.begin(), Pointers.end());
-
-      for (std::vector<Value *>::iterator PI = Pointers.begin(),
-                                          PE = Pointers.end();
-           ;) {
-        Value *V = *PI;
-
-        if (V->getName().size() == 0)
-          OS << "\"" << *V << "\"";
-        else
-          OS << "\"" << V->getName() << "\"";
-
-        ++PI;
-
-        if (PI != PE)
-          OS << ", ";
-        else
-          break;
-      }
+  if (IgnoreAliasing)
+    return true;
 
-      INVALID_NOVERIFY(Alias, OS.str());
+  // Check if the base pointer of the memory access does alias with
+  // any other pointer. This cannot be handled at the moment.
+  AliasSet &AS = Context.AST
+    .getAliasSetForPointer(BaseValue, AliasAnalysis::UnknownSize,
+                           Inst.getMetadata(LLVMContext::MD_tbaa));
+
+  // INVALID triggers an assertion in verifying mode, if it detects that a
+  // SCoP was detected by SCoP detection and that this SCoP was invalidated by
+  // a pass that stated it would preserve the SCoPs. We disable this check as
+  // the independent blocks pass may create memory references which seem to
+  // alias, if -basicaa is not available. They actually do not, but as we can
+  // not proof this without -basicaa we would fail. We disable this check to
+  // not cause irrelevant verification failures.
+  if (!AS.isMustAlias()) {
+    std::string Message;
+    raw_string_ostream OS(Message);
+
+    OS << "Possible aliasing: ";
+
+    std::vector<Value *> Pointers;
+
+    for (AliasSet::iterator AI = AS.begin(), AE = AS.end(); AI != AE; ++AI)
+      Pointers.push_back(AI.getPointer());
+
+    std::sort(Pointers.begin(), Pointers.end());
+
+    for (std::vector<Value *>::iterator PI = Pointers.begin(),
+           PE = Pointers.end();
+         ;) {
+      Value *V = *PI;
+
+      if (V->getName().size() == 0)
+        OS << "\"" << *V << "\"";
+      else
+        OS << "\"" << V->getName() << "\"";
+
+      ++PI;
+
+      if (PI != PE)
+        OS << ", ";
+      else
+        break;
     }
+
+    INVALID_NOVERIFY(Alias, OS.str());
   }
 
   return true;





More information about the llvm-commits mailing list