diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2014-11-11 21:30:22 +0000 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2014-11-11 21:30:22 +0000 |
commit | de36e8040fa72a8242de3fa4a2d663e1c8d0c225 (patch) | |
tree | f0f67024e641b7bbfa0282cae2ba097128370b06 /llvm/lib/Transforms/Utils/InlineFunction.cpp | |
parent | 6312f4a422ddcb6a262ffc9fd3699cd2ec570425 (diff) | |
download | llvm-de36e8040fa72a8242de3fa4a2d663e1c8d0c225.zip llvm-de36e8040fa72a8242de3fa4a2d663e1c8d0c225.tar.gz llvm-de36e8040fa72a8242de3fa4a2d663e1c8d0c225.tar.bz2 |
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.
llvm-svn: 221711
Diffstat (limited to 'llvm/lib/Transforms/Utils/InlineFunction.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/InlineFunction.cpp | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/llvm/lib/Transforms/Utils/InlineFunction.cpp b/llvm/lib/Transforms/Utils/InlineFunction.cpp index a1e42bb..2d0b7dc 100644 --- a/llvm/lib/Transforms/Utils/InlineFunction.cpp +++ b/llvm/lib/Transforms/Utils/InlineFunction.cpp @@ -297,9 +297,9 @@ static void CloneAliasScopeMetadata(CallSite CS, ValueToValueMapTy &VMap) { for (Function::const_iterator I = CalledFunc->begin(), IE = CalledFunc->end(); I != IE; ++I) for (BasicBlock::const_iterator J = I->begin(), JE = I->end(); J != JE; ++J) { - if (const MDNode *M = J->getMDNode(LLVMContext::MD_alias_scope)) + if (const MDNode *M = J->getMetadata(LLVMContext::MD_alias_scope)) MD.insert(M); - if (const MDNode *M = J->getMDNode(LLVMContext::MD_noalias)) + if (const MDNode *M = J->getMetadata(LLVMContext::MD_noalias)) MD.insert(M); } @@ -359,31 +359,32 @@ static void CloneAliasScopeMetadata(CallSite CS, ValueToValueMapTy &VMap) { if (!NI) continue; - if (MDNode *M = NI->getMDNode(LLVMContext::MD_alias_scope)) { + if (MDNode *M = NI->getMetadata(LLVMContext::MD_alias_scope)) { MDNode *NewMD = MDMap[M]; // If the call site also had alias scope metadata (a list of scopes to // which instructions inside it might belong), propagate those scopes to // the inlined instructions. if (MDNode *CSM = - CS.getInstruction()->getMDNode(LLVMContext::MD_alias_scope)) + CS.getInstruction()->getMetadata(LLVMContext::MD_alias_scope)) NewMD = MDNode::concatenate(NewMD, CSM); NI->setMetadata(LLVMContext::MD_alias_scope, NewMD); } else if (NI->mayReadOrWriteMemory()) { if (MDNode *M = - CS.getInstruction()->getMDNode(LLVMContext::MD_alias_scope)) + CS.getInstruction()->getMetadata(LLVMContext::MD_alias_scope)) NI->setMetadata(LLVMContext::MD_alias_scope, M); } - if (MDNode *M = NI->getMDNode(LLVMContext::MD_noalias)) { + if (MDNode *M = NI->getMetadata(LLVMContext::MD_noalias)) { MDNode *NewMD = MDMap[M]; // If the call site also had noalias metadata (a list of scopes with // which instructions inside it don't alias), propagate those scopes to // the inlined instructions. - if (MDNode *CSM = CS.getInstruction()->getMDNode(LLVMContext::MD_noalias)) + if (MDNode *CSM = + CS.getInstruction()->getMetadata(LLVMContext::MD_noalias)) NewMD = MDNode::concatenate(NewMD, CSM); NI->setMetadata(LLVMContext::MD_noalias, NewMD); } else if (NI->mayReadOrWriteMemory()) { - if (MDNode *M = CS.getInstruction()->getMDNode(LLVMContext::MD_noalias)) + if (MDNode *M = CS.getInstruction()->getMetadata(LLVMContext::MD_noalias)) NI->setMetadata(LLVMContext::MD_noalias, M); } } @@ -589,7 +590,7 @@ static void AddAliasScopeMetadata(CallSite CS, ValueToValueMapTy &VMap, if (!NoAliases.empty()) NI->setMetadata(LLVMContext::MD_noalias, MDNode::concatenate( - NI->getMDNode(LLVMContext::MD_noalias), + NI->getMetadata(LLVMContext::MD_noalias), MDNode::get(CalledFunc->getContext(), NoAliases))); // Next, we want to figure out all of the sets to which we might belong. @@ -615,7 +616,7 @@ static void AddAliasScopeMetadata(CallSite CS, ValueToValueMapTy &VMap, if (!Scopes.empty()) NI->setMetadata( LLVMContext::MD_alias_scope, - MDNode::concatenate(NI->getMDNode(LLVMContext::MD_alias_scope), + MDNode::concatenate(NI->getMetadata(LLVMContext::MD_alias_scope), MDNode::get(CalledFunc->getContext(), Scopes))); } } |