mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-23 01:24:30 +00:00
Revert "IR: MDNode => Value"
Instead, we're going to separate metadata from the Value hierarchy. See PR21532. This reverts commit r221375. This reverts commit r221373. This reverts commit r221359. This reverts commit r221167. This reverts commit r221027. This reverts commit r221024. This reverts commit r221023. This reverts commit r220995. This reverts commit r220994. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221711 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -493,7 +493,7 @@ TypeBasedAliasAnalysis::getModRefBehavior(ImmutableCallSite CS) {
|
||||
|
||||
// If this is an "immutable" type, we can assume the call doesn't write
|
||||
// to memory.
|
||||
if (const MDNode *M = CS.getInstruction()->getMDNode(LLVMContext::MD_tbaa))
|
||||
if (const MDNode *M = CS.getInstruction()->getMetadata(LLVMContext::MD_tbaa))
|
||||
if ((!isStructPathTBAA(M) && TBAANode(M).TypeIsImmutable()) ||
|
||||
(isStructPathTBAA(M) && TBAAStructTagNode(M).TypeIsImmutable()))
|
||||
Min = OnlyReadsMemory;
|
||||
@ -514,7 +514,8 @@ TypeBasedAliasAnalysis::getModRefInfo(ImmutableCallSite CS,
|
||||
return AliasAnalysis::getModRefInfo(CS, Loc);
|
||||
|
||||
if (const MDNode *L = Loc.AATags.TBAA)
|
||||
if (const MDNode *M = CS.getInstruction()->getMDNode(LLVMContext::MD_tbaa))
|
||||
if (const MDNode *M =
|
||||
CS.getInstruction()->getMetadata(LLVMContext::MD_tbaa))
|
||||
if (!Aliases(L, M))
|
||||
return NoModRef;
|
||||
|
||||
@ -527,9 +528,10 @@ TypeBasedAliasAnalysis::getModRefInfo(ImmutableCallSite CS1,
|
||||
if (!EnableTBAA)
|
||||
return AliasAnalysis::getModRefInfo(CS1, CS2);
|
||||
|
||||
if (const MDNode *M1 = CS1.getInstruction()->getMDNode(LLVMContext::MD_tbaa))
|
||||
if (const MDNode *M1 =
|
||||
CS1.getInstruction()->getMetadata(LLVMContext::MD_tbaa))
|
||||
if (const MDNode *M2 =
|
||||
CS2.getInstruction()->getMDNode(LLVMContext::MD_tbaa))
|
||||
CS2.getInstruction()->getMetadata(LLVMContext::MD_tbaa))
|
||||
if (!Aliases(M1, M2))
|
||||
return NoModRef;
|
||||
|
||||
@ -613,20 +615,20 @@ MDNode *MDNode::getMostGenericTBAA(MDNode *A, MDNode *B) {
|
||||
void Instruction::getAAMetadata(AAMDNodes &N, bool Merge) const {
|
||||
if (Merge)
|
||||
N.TBAA =
|
||||
MDNode::getMostGenericTBAA(N.TBAA, getMDNode(LLVMContext::MD_tbaa));
|
||||
MDNode::getMostGenericTBAA(N.TBAA, getMetadata(LLVMContext::MD_tbaa));
|
||||
else
|
||||
N.TBAA = getMDNode(LLVMContext::MD_tbaa);
|
||||
N.TBAA = getMetadata(LLVMContext::MD_tbaa);
|
||||
|
||||
if (Merge)
|
||||
N.Scope =
|
||||
MDNode::intersect(N.Scope, getMDNode(LLVMContext::MD_alias_scope));
|
||||
MDNode::intersect(N.Scope, getMetadata(LLVMContext::MD_alias_scope));
|
||||
else
|
||||
N.Scope = getMDNode(LLVMContext::MD_alias_scope);
|
||||
N.Scope = getMetadata(LLVMContext::MD_alias_scope);
|
||||
|
||||
if (Merge)
|
||||
N.NoAlias =
|
||||
MDNode::intersect(N.NoAlias, getMDNode(LLVMContext::MD_noalias));
|
||||
MDNode::intersect(N.NoAlias, getMetadata(LLVMContext::MD_noalias));
|
||||
else
|
||||
N.NoAlias = getMDNode(LLVMContext::MD_noalias);
|
||||
N.NoAlias = getMetadata(LLVMContext::MD_noalias);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user