diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2016-03-25 00:35:38 +0000 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2016-03-25 00:35:38 +0000 |
commit | 1d15a9f0c976a4c13d38010da2b4f3a9f97450bf (patch) | |
tree | 19ef34fcb255d206dc743648a0cd0566f2062479 /llvm/lib/IR/LLVMContext.cpp | |
parent | 0dab98d9269355d3622c0949f27e2559892f2757 (diff) | |
download | llvm-1d15a9f0c976a4c13d38010da2b4f3a9f97450bf.zip llvm-1d15a9f0c976a4c13d38010da2b4f3a9f97450bf.tar.gz llvm-1d15a9f0c976a4c13d38010da2b4f3a9f97450bf.tar.bz2 |
IR: Reserve an MDKind for !llvm.loop; NFC
This reserves an MDKind for !llvm.loop, which allows callers to avoid a
string-based lookup. I'm not sure why it was missing.
There should be no functionality change here, just a small compile-time
speedup.
llvm-svn: 264371
Diffstat (limited to 'llvm/lib/IR/LLVMContext.cpp')
-rw-r--r-- | llvm/lib/IR/LLVMContext.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/IR/LLVMContext.cpp b/llvm/lib/IR/LLVMContext.cpp index 77cefd0..151c205 100644 --- a/llvm/lib/IR/LLVMContext.cpp +++ b/llvm/lib/IR/LLVMContext.cpp @@ -128,6 +128,11 @@ LLVMContext::LLVMContext() : pImpl(new LLVMContextImpl(*this)) { assert(AlignID == MD_align && "align kind id drifted"); (void)AlignID; + // Create the 'llvm.loop' metadata kind. + unsigned LoopID = getMDKindID("llvm.loop"); + assert(LoopID == MD_loop && "llvm.loop kind id drifted"); + (void)LoopID; + auto *DeoptEntry = pImpl->getOrInsertBundleTag("deopt"); assert(DeoptEntry->second == LLVMContext::OB_deopt && "deopt operand bundle id drifted!"); |