mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-21 21:29:41 +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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213514 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
34e658840e
commit
43b125912e
@ -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