llvm.org GIT mirror llvm / 43b1259
Move isIdentifiedFunctionLocal from BasicAA to AA The ability to identify function locals will exist outside of BasicAA (for example, logic for inferring noalias function arguments will need this), so make this concept generally accessible without code duplication. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213514 91177308-0d34-0410-b5e6-96231b3b80d8 Hal Finkel 5 years ago
3 changed file(s) with 18 addition(s) and 11 deletion(s). Raw diff Collapse all Expand all
604604 ///
605605 bool isIdentifiedObject(const Value *V);
606606
607 /// isIdentifiedFunctionLocal - Return true if V is umabigously identified
608 /// at the function-level. Different IdentifiedFunctionLocals can't alias.
609 /// Further, an IdentifiedFunctionLocal can not alias with any function
610 /// arguments other than itself, which is not necessarily true for
611 /// IdentifiedObjects.
612 bool isIdentifiedFunctionLocal(const Value *V);
613
607614 } // End llvm namespace
608615
609616 #endif
581581 return A->hasNoAliasAttr() || A->hasByValAttr();
582582 return false;
583583 }
584
585 /// isIdentifiedFunctionLocal - Return true if V is umabigously identified
586 /// at the function-level. Different IdentifiedFunctionLocals can't alias.
587 /// Further, an IdentifiedFunctionLocal can not alias with any function
588 /// arguments other than itself, which is not necessarily true for
589 /// IdentifiedObjects.
590 bool llvm::isIdentifiedFunctionLocal(const Value *V)
591 {
592 return isa(V) || isNoAliasCall(V) || isNoAliasArgument(V);
593 }
594
155155 return ObjectSize != AliasAnalysis::UnknownSize && ObjectSize == Size;
156156 }
157157
158 /// isIdentifiedFunctionLocal - Return true if V is umabigously identified
159 /// at the function-level. Different IdentifiedFunctionLocals can't alias.
160 /// Further, an IdentifiedFunctionLocal can not alias with any function
161 /// arguments other than itself, which is not necessarily true for
162 /// IdentifiedObjects.
163 static bool isIdentifiedFunctionLocal(const Value *V)
164 {
165 return isa(V) || isNoAliasCall(V) || isNoAliasArgument(V);
166 }
167
168
169158 //===----------------------------------------------------------------------===//
170159 // GetElementPtr Instruction Decomposition and Analysis
171160 //===----------------------------------------------------------------------===//