mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-08 19:25:47 +00:00
Global Aliases are not identifiable objects.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80263 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -347,7 +347,7 @@ bool isNoAliasCall(const Value *V);
|
|||||||
|
|
||||||
/// isIdentifiedObject - Return true if this pointer refers to a distinct and
|
/// isIdentifiedObject - Return true if this pointer refers to a distinct and
|
||||||
/// identifiable object. This returns true for:
|
/// identifiable object. This returns true for:
|
||||||
/// Global Variables and Functions
|
/// Global Variables and Functions (but not Global Aliases)
|
||||||
/// Allocas and Mallocs
|
/// Allocas and Mallocs
|
||||||
/// ByVal and NoAlias Arguments
|
/// ByVal and NoAlias Arguments
|
||||||
/// NoAlias returns
|
/// NoAlias returns
|
||||||
|
@@ -233,13 +233,15 @@ bool llvm::isNoAliasCall(const Value *V) {
|
|||||||
|
|
||||||
/// isIdentifiedObject - Return true if this pointer refers to a distinct and
|
/// isIdentifiedObject - Return true if this pointer refers to a distinct and
|
||||||
/// identifiable object. This returns true for:
|
/// identifiable object. This returns true for:
|
||||||
/// Global Variables and Functions
|
/// Global Variables and Functions (but not Global Aliases)
|
||||||
/// Allocas and Mallocs
|
/// Allocas and Mallocs
|
||||||
/// ByVal and NoAlias Arguments
|
/// ByVal and NoAlias Arguments
|
||||||
/// NoAlias returns
|
/// NoAlias returns
|
||||||
///
|
///
|
||||||
bool llvm::isIdentifiedObject(const Value *V) {
|
bool llvm::isIdentifiedObject(const Value *V) {
|
||||||
if (isa<GlobalValue>(V) || isa<AllocationInst>(V) || isNoAliasCall(V))
|
if (isa<AllocationInst>(V) || isNoAliasCall(V))
|
||||||
|
return true;
|
||||||
|
if (isa<GlobalValue>(V) && !isa<GlobalAlias>(V))
|
||||||
return true;
|
return true;
|
||||||
if (const Argument *A = dyn_cast<Argument>(V))
|
if (const Argument *A = dyn_cast<Argument>(V))
|
||||||
return A->hasNoAliasAttr() || A->hasByValAttr();
|
return A->hasNoAliasAttr() || A->hasByValAttr();
|
||||||
|
Reference in New Issue
Block a user