diff options
author | Piotr Padlewski <piotr.padlewski@gmail.com> | 2017-04-24 12:58:43 +0000 |
---|---|---|
committer | Piotr Padlewski <piotr.padlewski@gmail.com> | 2017-04-24 12:58:43 +0000 |
commit | 34046bd358a10bc9d0df6f73083b71b3622efece (patch) | |
tree | ed2159251db626a3dee36306ade167bbb154fab9 /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | 1e8648577c6a47fbd136801ec686e30c3819a8d3 (diff) | |
download | bcm5719-llvm-34046bd358a10bc9d0df6f73083b71b3622efece.tar.gz bcm5719-llvm-34046bd358a10bc9d0df6f73083b71b3622efece.zip |
[Devirtualization] Emit invariant.group loads with empty group md
Summary:
As discussed here
http://lists.llvm.org/pipermail/llvm-dev/2017-January/109332.html
having different groups doesn't solve the problem entirly.
Reviewers: rjmccall, rsmith
Subscribers: amharc, cfe-commits
Differential Revision: https://reviews.llvm.org/D32110
llvm-svn: 301178
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index 19203973ff1..25d32f19d0e 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -565,12 +565,8 @@ void CodeGenModule::DecorateInstructionWithTBAA(llvm::Instruction *Inst, void CodeGenModule::DecorateInstructionWithInvariantGroup( llvm::Instruction *I, const CXXRecordDecl *RD) { - llvm::Metadata *MD = CreateMetadataIdentifierForType(QualType(RD->getTypeForDecl(), 0)); - auto *MetaDataNode = dyn_cast<llvm::MDNode>(MD); - // Check if we have to wrap MDString in MDNode. - if (!MetaDataNode) - MetaDataNode = llvm::MDNode::get(getLLVMContext(), MD); - I->setMetadata(llvm::LLVMContext::MD_invariant_group, MetaDataNode); + I->setMetadata(llvm::LLVMContext::MD_invariant_group, + llvm::MDNode::get(getLLVMContext(), {})); } void CodeGenModule::Error(SourceLocation loc, StringRef message) { |