mirror of
https://github.com/RPCS3/llvm.git
synced 2025-03-06 01:27:08 +00:00
Added MD_invariant_group to LLVMContext
http://reviews.llvm.org/D12926 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247931 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
3011017ecc
commit
c11b75566a
@ -62,7 +62,8 @@ public:
|
|||||||
MD_dereferenceable = 12, // "dereferenceable"
|
MD_dereferenceable = 12, // "dereferenceable"
|
||||||
MD_dereferenceable_or_null = 13, // "dereferenceable_or_null"
|
MD_dereferenceable_or_null = 13, // "dereferenceable_or_null"
|
||||||
MD_make_implicit = 14, // "make.implicit"
|
MD_make_implicit = 14, // "make.implicit"
|
||||||
MD_unpredictable = 15 // "unpredictable"
|
MD_unpredictable = 15, // "unpredictable"
|
||||||
|
MD_invariant_group = 16 // "invariant.group"
|
||||||
};
|
};
|
||||||
|
|
||||||
/// getMDKindID - Return a unique non-zero ID for the specified metadata kind.
|
/// getMDKindID - Return a unique non-zero ID for the specified metadata kind.
|
||||||
|
@ -4836,6 +4836,6 @@ bool CodeGenPrepare::splitBranchCondition(Function &F) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void CodeGenPrepare::stripInvariantGroupMetadata(Instruction &I) {
|
void CodeGenPrepare::stripInvariantGroupMetadata(Instruction &I) {
|
||||||
if (auto *InvariantMD = I.getMetadata("invariant.group"))
|
if (auto *InvariantMD = I.getMetadata(LLVMContext::MD_invariant_group))
|
||||||
I.dropUnknownNonDebugMetadata(InvariantMD->getMetadataID());
|
I.dropUnknownNonDebugMetadata(InvariantMD->getMetadataID());
|
||||||
}
|
}
|
||||||
|
@ -116,6 +116,13 @@ LLVMContext::LLVMContext() : pImpl(new LLVMContextImpl(*this)) {
|
|||||||
assert(UnpredictableID == MD_unpredictable &&
|
assert(UnpredictableID == MD_unpredictable &&
|
||||||
"unpredictable kind id drifted");
|
"unpredictable kind id drifted");
|
||||||
(void)UnpredictableID;
|
(void)UnpredictableID;
|
||||||
|
|
||||||
|
// Create the 'invariant.group' metadata kind.
|
||||||
|
unsigned InvariantGroupId = getMDKindID("invariant.group");
|
||||||
|
assert(InvariantGroupId == MD_invariant_group &&
|
||||||
|
"invariant.group kind id drifted");
|
||||||
|
(void)InvariantGroupId;
|
||||||
|
|
||||||
}
|
}
|
||||||
LLVMContext::~LLVMContext() { delete pImpl; }
|
LLVMContext::~LLVMContext() { delete pImpl; }
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user