aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Analysis/LoopInfo.cpp
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2014-11-01 00:10:31 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2014-11-01 00:10:31 +0000
commit3872d0084c4f479020ce01b4db5d1bd414c57fb8 (patch)
treefd1a9e83666fa84a3916b46a94cca32978b34794 /llvm/lib/Analysis/LoopInfo.cpp
parent7c4fc4e5ae4c8145974397da295587e77c770f62 (diff)
downloadllvm-3872d0084c4f479020ce01b4db5d1bd414c57fb8.zip
llvm-3872d0084c4f479020ce01b4db5d1bd414c57fb8.tar.gz
llvm-3872d0084c4f479020ce01b4db5d1bd414c57fb8.tar.bz2
IR: MDNode => Value: Instruction::getMetadata()
Change `Instruction::getMetadata()` to return `Value` as part of PR21433. Update most callers to use `Instruction::getMDNode()`, which wraps the result in a `cast_or_null<MDNode>`. llvm-svn: 221024
Diffstat (limited to 'llvm/lib/Analysis/LoopInfo.cpp')
-rw-r--r--llvm/lib/Analysis/LoopInfo.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Analysis/LoopInfo.cpp b/llvm/lib/Analysis/LoopInfo.cpp
index 2e0fdec..fd43829 100644
--- a/llvm/lib/Analysis/LoopInfo.cpp
+++ b/llvm/lib/Analysis/LoopInfo.cpp
@@ -235,7 +235,7 @@ bool Loop::isSafeToClone() const {
MDNode *Loop::getLoopID() const {
MDNode *LoopID = nullptr;
if (isLoopSimplifyForm()) {
- LoopID = getLoopLatch()->getTerminator()->getMetadata(LoopMDName);
+ LoopID = getLoopLatch()->getTerminator()->getMDNode(LoopMDName);
} else {
// Go through each predecessor of the loop header and check the
// terminator for the metadata.
@@ -247,7 +247,7 @@ MDNode *Loop::getLoopID() const {
// Check if this terminator branches to the loop header.
for (unsigned i = 0, ie = TI->getNumSuccessors(); i != ie; ++i) {
if (TI->getSuccessor(i) == H) {
- MD = TI->getMetadata(LoopMDName);
+ MD = TI->getMDNode(LoopMDName);
break;
}
}
@@ -309,7 +309,7 @@ bool Loop::isAnnotatedParallel() const {
// nested parallel loops). The loop identifier metadata refers to
// itself so we can check both cases with the same routine.
MDNode *loopIdMD =
- II->getMetadata(LLVMContext::MD_mem_parallel_loop_access);
+ II->getMDNode(LLVMContext::MD_mem_parallel_loop_access);
if (!loopIdMD)
return false;