[polly] r223620 - Stop relying on MDNode::get() returning self-references
Duncan P. N. Exon Smith
dexonsmith at apple.com
Sun Dec 7 13:12:11 PST 2014
Author: dexonsmith
Date: Sun Dec 7 15:12:10 2014
New Revision: 223620
URL: http://llvm.org/viewvc/llvm-project?rev=223620&view=rev
Log:
Stop relying on MDNode::get() returning self-references
Update for LLVM API change, wherein self-references are not uniqued (and
will never be returned by `MDNode::get()`). We already have `Id`; just
return it.
This should fix the failing buildbot:
http://lab.llvm.org:8011/builders/polly-amd64-linux/builds/25167
http://lab.llvm.org:8011/builders/polly-amd64-linux/builds/25168
Modified:
polly/trunk/lib/CodeGen/IRBuilder.cpp
Modified: polly/trunk/lib/CodeGen/IRBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/CodeGen/IRBuilder.cpp?rev=223620&r1=223619&r2=223620&view=diff
==============================================================================
--- polly/trunk/lib/CodeGen/IRBuilder.cpp (original)
+++ polly/trunk/lib/CodeGen/IRBuilder.cpp Sun Dec 7 15:12:10 2014
@@ -95,9 +95,10 @@ void ScopAnnotator::pushLoop(Loop *L, bo
BasicBlock *Header = L->getHeader();
MDNode *Id = getID(Header->getContext());
- Value *Args[] = {Id};
+ assert(Id->getOperand(0) == Id && "Expected Id to be a self-reference");
+ assert(Id->getNumOperands() == 1 && "Unexpected extra operands in Id");
MDNode *Ids = ParallelLoops.empty()
- ? MDNode::get(Header->getContext(), Args)
+ ? Id
: MDNode::concatenate(ParallelLoops.back(), Id);
ParallelLoops.push_back(Ids);
}
More information about the llvm-commits
mailing list