diff options
Diffstat (limited to 'polly/lib/Analysis')
| -rw-r--r-- | polly/lib/Analysis/ScopDetection.cpp | 42 | ||||
| -rw-r--r-- | polly/lib/Analysis/ScopGraphPrinter.cpp | 2 | ||||
| -rw-r--r-- | polly/lib/Analysis/TempScopInfo.cpp | 13 | 
3 files changed, 29 insertions, 28 deletions
diff --git a/polly/lib/Analysis/ScopDetection.cpp b/polly/lib/Analysis/ScopDetection.cpp index 262281e1720..d25e625cefb 100644 --- a/polly/lib/Analysis/ScopDetection.cpp +++ b/polly/lib/Analysis/ScopDetection.cpp @@ -115,7 +115,7 @@ STATISTIC(ValidRegion, "Number of regions that a valid part of Scop");      LastFailure = Buf;                                                         \      DEBUG(dbgs() << MESSAGE);                                                  \      DEBUG(dbgs() << "\n");                                                     \ -    assert(!Context.Verifying && #NAME);                                       \ +    assert(!Context.Verifying &&#NAME);                                        \      if (!Context.Verifying)                                                    \        ++Bad##NAME##ForScop;                                                    \      return false;                                                              \ @@ -212,9 +212,9 @@ bool ScopDetection::isValidCFG(BasicBlock &BB,      if (!isAffineExpr(&Context.CurRegion, LHS, *SE) ||          !isAffineExpr(&Context.CurRegion, RHS, *SE)) -      INVALID(AffFunc, "Non affine branch in BB '" << BB.getName() -                                                   << "' with LHS: " << *LHS -                                                   << " and RHS: " << *RHS); +      INVALID(AffFunc, +              "Non affine branch in BB '" << BB.getName() << "' with LHS: " +                                          << *LHS << " and RHS: " << *RHS);    }    // Allow loop exit conditions. @@ -267,8 +267,8 @@ bool ScopDetection::isValidMemoryAccess(Instruction &Inst,    AccessFunction = SE->getMinusSCEV(AccessFunction, BasePointer); -  if (!AllowNonAffine && !isAffineExpr(&Context.CurRegion, AccessFunction, *SE, -                                       BaseValue)) +  if (!AllowNonAffine && +      !isAffineExpr(&Context.CurRegion, AccessFunction, *SE, BaseValue))      INVALID(AffFunc, "Non affine access function: " << *AccessFunction);    // FIXME: Alias Analysis thinks IntToPtrInst aliases with alloca instructions @@ -279,17 +279,17 @@ bool ScopDetection::isValidMemoryAccess(Instruction &Inst,    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. +    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); @@ -304,7 +304,8 @@ bool ScopDetection::isValidMemoryAccess(Instruction &Inst,        std::sort(Pointers.begin(), Pointers.end());        for (std::vector<Value *>::iterator PI = Pointers.begin(), -          PE = Pointers.end(); ;) { +                                          PE = Pointers.end(); +           ;) {          Value *V = *PI;          if (V->getName().size() == 0) @@ -402,9 +403,8 @@ bool ScopDetection::isValidLoop(Loop *L, DetectionContext &Context) const {    // Is the loop count affine?    const SCEV *LoopCount = SE->getBackedgeTakenCount(L);    if (!isAffineExpr(&Context.CurRegion, LoopCount, *SE)) -    INVALID(LoopBound, -            "Non affine loop bound '" -                << *LoopCount << "' in loop: " << L->getHeader()->getName()); +    INVALID(LoopBound, "Non affine loop bound '" << *LoopCount << "' in loop: " +                                                 << L->getHeader()->getName());    return true;  } diff --git a/polly/lib/Analysis/ScopGraphPrinter.cpp b/polly/lib/Analysis/ScopGraphPrinter.cpp index 9a78f7a7472..6f7668589ca 100644 --- a/polly/lib/Analysis/ScopGraphPrinter.cpp +++ b/polly/lib/Analysis/ScopGraphPrinter.cpp @@ -162,7 +162,7 @@ struct DOTGraphTraits<ScopDetection *> : public DOTGraphTraits<RegionNode *> {    }  }; -} //end namespace llvm +} // end namespace llvm  struct ScopViewer : public DOTGraphTraitsViewer<ScopDetection, false> {    static char ID; diff --git a/polly/lib/Analysis/TempScopInfo.cpp b/polly/lib/Analysis/TempScopInfo.cpp index b475ab4555d..09ba52cfa55 100644 --- a/polly/lib/Analysis/TempScopInfo.cpp +++ b/polly/lib/Analysis/TempScopInfo.cpp @@ -138,8 +138,7 @@ IRAccess TempScopInfo::buildIRAccess(Instruction *Inst, Loop *L, Region *R) {      Type = IRAccess::WRITE;    } -  const SCEV *AccessFunction = -      SE->getSCEVAtScope(getPointerOperand(*Inst), L); +  const SCEV *AccessFunction = SE->getSCEVAtScope(getPointerOperand(*Inst), L);    const SCEVUnknown *BasePointer =        dyn_cast<SCEVUnknown>(SE->getPointerBase(AccessFunction)); @@ -148,7 +147,8 @@ IRAccess TempScopInfo::buildIRAccess(Instruction *Inst, Loop *L, Region *R) {    bool IsAffine = isAffineExpr(R, AccessFunction, *SE, BasePointer->getValue()); -  return IRAccess(Type, BasePointer->getValue(), AccessFunction, Size, IsAffine); +  return IRAccess(Type, BasePointer->getValue(), AccessFunction, Size, +                  IsAffine);  }  void TempScopInfo::buildAccessFunctions(Region &R, BasicBlock &BB) { @@ -160,7 +160,8 @@ void TempScopInfo::buildAccessFunctions(Region &R, BasicBlock &BB) {      if (isa<LoadInst>(Inst) || isa<StoreInst>(Inst))        Functions.push_back(std::make_pair(buildIRAccess(Inst, L, &R), Inst)); -    if (!isa<StoreInst>(Inst))  buildScalarDependences(Inst, &R); +    if (!isa<StoreInst>(Inst)) +      buildScalarDependences(Inst, &R);    }    if (Functions.empty()) @@ -233,8 +234,8 @@ void TempScopInfo::buildAffineCondition(Value &V, bool inverted,    case ICmpInst::ICMP_ULE:      // TODO: At the moment we need to see everything as signed. This is an      //       correctness issue that needs to be solved. -    //AffLHS->setUnsigned(); -    //AffRHS->setUnsigned(); +    // AffLHS->setUnsigned(); +    // AffRHS->setUnsigned();      break;    default:      break;  | 

