mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-20 20:30:56 +00:00
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. llvm-svn: 213514
This commit is contained in:
parent
9c33e93011
commit
60f586ad81
@ -605,6 +605,13 @@ bool isNoAliasArgument(const Value *V);
|
||||
///
|
||||
bool isIdentifiedObject(const Value *V);
|
||||
|
||||
/// isIdentifiedFunctionLocal - Return true if V is umabigously identified
|
||||
/// at the function-level. Different IdentifiedFunctionLocals can't alias.
|
||||
/// Further, an IdentifiedFunctionLocal can not alias with any function
|
||||
/// arguments other than itself, which is not necessarily true for
|
||||
/// IdentifiedObjects.
|
||||
bool isIdentifiedFunctionLocal(const Value *V);
|
||||
|
||||
} // End llvm namespace
|
||||
|
||||
#endif
|
||||
|
@ -582,3 +582,14 @@ bool llvm::isIdentifiedObject(const Value *V) {
|
||||
return A->hasNoAliasAttr() || A->hasByValAttr();
|
||||
return false;
|
||||
}
|
||||
|
||||
/// isIdentifiedFunctionLocal - Return true if V is umabigously identified
|
||||
/// at the function-level. Different IdentifiedFunctionLocals can't alias.
|
||||
/// Further, an IdentifiedFunctionLocal can not alias with any function
|
||||
/// arguments other than itself, which is not necessarily true for
|
||||
/// IdentifiedObjects.
|
||||
bool llvm::isIdentifiedFunctionLocal(const Value *V)
|
||||
{
|
||||
return isa<AllocaInst>(V) || isNoAliasCall(V) || isNoAliasArgument(V);
|
||||
}
|
||||
|
||||
|
@ -156,17 +156,6 @@ static bool isObjectSize(const Value *V, uint64_t Size,
|
||||
return ObjectSize != AliasAnalysis::UnknownSize && ObjectSize == Size;
|
||||
}
|
||||
|
||||
/// isIdentifiedFunctionLocal - Return true if V is umabigously identified
|
||||
/// at the function-level. Different IdentifiedFunctionLocals can't alias.
|
||||
/// Further, an IdentifiedFunctionLocal can not alias with any function
|
||||
/// arguments other than itself, which is not necessarily true for
|
||||
/// IdentifiedObjects.
|
||||
static bool isIdentifiedFunctionLocal(const Value *V)
|
||||
{
|
||||
return isa<AllocaInst>(V) || isNoAliasCall(V) || isNoAliasArgument(V);
|
||||
}
|
||||
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// GetElementPtr Instruction Decomposition and Analysis
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
Loading…
x
Reference in New Issue
Block a user