[llvm-commits] [polly] r144230 - in /polly/trunk: include/polly/TempScopInfo.h lib/MayAliasSet.cpp

Tobias Grosser grosser at fim.uni-passau.de
Wed Nov 9 14:35:05 PST 2011


Author: grosser
Date: Wed Nov  9 16:35:05 2011
New Revision: 144230

URL: http://llvm.org/viewvc/llvm-project?rev=144230&view=rev
Log:
Further remove now invalid SCEVAffFunc features.

This also removes the construction of MayAliasSets that became invalid when
removing the use of SCEVAffFunc.

Modified:
    polly/trunk/include/polly/TempScopInfo.h
    polly/trunk/lib/MayAliasSet.cpp

Modified: polly/trunk/include/polly/TempScopInfo.h
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/include/polly/TempScopInfo.h?rev=144230&r1=144229&r2=144230&view=diff
==============================================================================
--- polly/trunk/include/polly/TempScopInfo.h (original)
+++ polly/trunk/include/polly/TempScopInfo.h Wed Nov  9 16:35:05 2011
@@ -36,9 +36,6 @@
 ///
 /// A helper class for collect affine function information
 class SCEVAffFunc {
-  // Temporary hack
-  friend class TempScopInfo;
-
 public:
   // The scalar evolution expression from which we derived this affine
   // expression.
@@ -58,7 +55,6 @@
   // The base address of the address SCEV, if the Value is a pointer, this is
   // an array access, otherwise, this is a value access.
   // And the Write/Read modifier
-  Value *BaseAddr;
   unsigned ElemBytes        : 28;
   SCEVAffFuncType FuncType  : 3;
 
@@ -67,8 +63,7 @@
   ///        condition type
   explicit SCEVAffFunc(SCEVAffFuncType Type, const SCEV *OriginalSCEV,
                        unsigned elemBytes = 0)
-    : OriginalSCEV(OriginalSCEV), BaseAddr(0),
-      ElemBytes(elemBytes), FuncType(Type) {}
+    : OriginalSCEV(OriginalSCEV), ElemBytes(elemBytes), FuncType(Type) {}
 
   enum SCEVAffFuncType getType() const { return FuncType; }
 
@@ -77,8 +72,6 @@
   }
 
   bool isRead() const { return FuncType == ReadMem; }
-
-  const Value *getBaseAddr() const { return BaseAddr; }
 };
 
 class Comparison {

Modified: polly/trunk/lib/MayAliasSet.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/MayAliasSet.cpp?rev=144230&r1=144229&r2=144230&view=diff
==============================================================================
--- polly/trunk/lib/MayAliasSet.cpp (original)
+++ polly/trunk/lib/MayAliasSet.cpp Wed Nov  9 16:35:05 2011
@@ -44,49 +44,4 @@
 }
 
 void MayAliasSetInfo::buildMayAliasSets(TempScop &Scop, AliasAnalysis &AA) {
-  AliasSetTracker AST(AA); 
-  Region &MaxR = Scop.getMaxRegion();
-
-  // Find out all base pointers that appeared in Scop and build the Alias set.
-  // Note: We may build the alias sets while we are building access functions
-  // to obtain better performance.
-  for (Region::block_iterator I = MaxR.block_begin(), E = MaxR.block_end();
-      I != E; ++I) {
-    BasicBlock *BB = I->getNodeAs<BasicBlock>();
-    if (const AccFuncSetType *AFS = Scop.getAccessFunctions(BB)) {
-      for (AccFuncSetType::const_iterator AI = AFS->begin(), AE = AFS->end();
-          AI != AE; ++AI) {
-        const SCEVAffFunc &AccFunc = AI->first;
-        Instruction *Inst = AI->second;
-        Value *BaseAddr = const_cast<Value*>(AccFunc.getBaseAddr());
-
-        AST.add(BaseAddr, AliasAnalysis::UnknownSize,
-          Inst->getMetadata(LLVMContext::MD_tbaa));
-      }
-    }
-  }
-
-  // Build the may-alias set with the AliasSetTracker.
-  for (AliasSetTracker::iterator I = AST.begin(), E = AST.end(); I != E; ++I) {
-    AliasSet &AS = *I;
-
-    // Ignore the dummy alias set.
-    if (AS.isForwardingAliasSet()) continue;
-
-    // The most simple case: All pointers in the set must-alias each others.
-    if (AS.isMustAlias()) {
-      MayAliasSet *MayAS = new (MayASAllocator.Allocate()) MayAliasSet();
-
-      for (AliasSet::iterator PI = AS.begin(), PE = AS.end(); PI != PE; ++PI) {
-        Value *Ptr = PI.getPointer();
-
-        MayAS->addMustAliasPtr(Ptr);
-        BasePtrMap.insert(std::make_pair(Ptr, MayAS));
-      }
-
-      continue;
-    }
-
-    assert(0 && "SCoPDetection pass should not allow May-Alias set!");
-  }
 }





More information about the llvm-commits mailing list