forked from OSchip/llvm-project
[IR] Re-group AAMDNodes relevant interfaces. NFC.
This commit is contained in:
parent
131e878664
commit
2d1ffad010
|
@ -307,9 +307,6 @@ public:
|
|||
Value::getAllMetadata(MDs);
|
||||
}
|
||||
|
||||
/// Returns the AA metadata for this instruction.
|
||||
AAMDNodes getAAMetadata() const;
|
||||
|
||||
/// Set the metadata of the specified kind to the specified node. This updates
|
||||
/// or replaces metadata if already present, or removes it if Node is null.
|
||||
void setMetadata(unsigned KindID, MDNode *Node);
|
||||
|
@ -350,7 +347,10 @@ public:
|
|||
/// to the existing node.
|
||||
void addAnnotationMetadata(StringRef Annotation);
|
||||
|
||||
/// Sets the metadata on this instruction from the AAMDNodes structure.
|
||||
/// Returns the AA metadata for this instruction.
|
||||
AAMDNodes getAAMetadata() const;
|
||||
|
||||
/// Sets the AA metadata on this instruction from the AAMDNodes structure.
|
||||
void setAAMetadata(const AAMDNodes &N);
|
||||
|
||||
/// Retrieve the raw weight values of a conditional branch or select.
|
||||
|
|
|
@ -538,15 +538,6 @@ AAMDNodes AAMDNodes::concat(const AAMDNodes &Other) const {
|
|||
return Result;
|
||||
}
|
||||
|
||||
AAMDNodes Instruction::getAAMetadata() const {
|
||||
AAMDNodes Result;
|
||||
Result.TBAA = getMetadata(LLVMContext::MD_tbaa);
|
||||
Result.TBAAStruct = getMetadata(LLVMContext::MD_tbaa_struct);
|
||||
Result.Scope = getMetadata(LLVMContext::MD_alias_scope);
|
||||
Result.NoAlias = getMetadata(LLVMContext::MD_noalias);
|
||||
return Result;
|
||||
}
|
||||
|
||||
static const MDNode *createAccessTag(const MDNode *AccessType) {
|
||||
// If there is no access type or the access type is the root node, then
|
||||
// we don't have any useful access tag to return.
|
||||
|
|
|
@ -1367,6 +1367,15 @@ void Instruction::addAnnotationMetadata(StringRef Name) {
|
|||
setMetadata(LLVMContext::MD_annotation, MD);
|
||||
}
|
||||
|
||||
AAMDNodes Instruction::getAAMetadata() const {
|
||||
AAMDNodes Result;
|
||||
Result.TBAA = getMetadata(LLVMContext::MD_tbaa);
|
||||
Result.TBAAStruct = getMetadata(LLVMContext::MD_tbaa_struct);
|
||||
Result.Scope = getMetadata(LLVMContext::MD_alias_scope);
|
||||
Result.NoAlias = getMetadata(LLVMContext::MD_noalias);
|
||||
return Result;
|
||||
}
|
||||
|
||||
void Instruction::setAAMetadata(const AAMDNodes &N) {
|
||||
setMetadata(LLVMContext::MD_tbaa, N.TBAA);
|
||||
setMetadata(LLVMContext::MD_tbaa_struct, N.TBAAStruct);
|
||||
|
|
Loading…
Reference in New Issue