mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-02 16:56:50 +00:00
MIR Serialization: Serialize the memory operand's noalias metadata node.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245246 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ed8c969d30
commit
971d8c0000
@ -446,6 +446,7 @@ static MIToken::TokenKind getMetadataKeywordKind(StringRef Identifier) {
|
||||
return StringSwitch<MIToken::TokenKind>(Identifier)
|
||||
.Case("!tbaa", MIToken::md_tbaa)
|
||||
.Case("!alias.scope", MIToken::md_alias_scope)
|
||||
.Case("!noalias", MIToken::md_noalias)
|
||||
.Default(MIToken::Error);
|
||||
}
|
||||
|
||||
|
@ -88,6 +88,7 @@ struct MIToken {
|
||||
// Named metadata keywords
|
||||
md_tbaa,
|
||||
md_alias_scope,
|
||||
md_noalias,
|
||||
|
||||
// Identifier tokens
|
||||
Identifier,
|
||||
|
@ -1543,11 +1543,16 @@ bool MIParser::parseMachineMemoryOperand(MachineMemOperand *&Dest) {
|
||||
if (parseMDNode(AAInfo.Scope))
|
||||
return true;
|
||||
break;
|
||||
// TODO: Parse AA NoAlias metadata.
|
||||
case MIToken::md_noalias:
|
||||
lex();
|
||||
if (parseMDNode(AAInfo.NoAlias))
|
||||
return true;
|
||||
break;
|
||||
// TODO: Parse the ranges metadata.
|
||||
// TODO: Report an error on duplicate metadata nodes.
|
||||
default:
|
||||
return error("expected 'align' or '!tbaa' or '!alias.scope'");
|
||||
return error(
|
||||
"expected 'align' or '!tbaa' or '!alias.scope' or '!noalias'");
|
||||
}
|
||||
}
|
||||
if (expectAndConsume(MIToken::rparen))
|
||||
|
@ -786,7 +786,10 @@ void MIPrinter::print(const MachineMemOperand &Op) {
|
||||
OS << ", !alias.scope ";
|
||||
AAInfo.Scope->printAsOperand(OS, MST);
|
||||
}
|
||||
// TODO: Print AA NoAlias metadata.
|
||||
if (AAInfo.NoAlias) {
|
||||
OS << ", !noalias ";
|
||||
AAInfo.NoAlias->printAsOperand(OS, MST);
|
||||
}
|
||||
// TODO: Print the ranges metadata.
|
||||
OS << ')';
|
||||
}
|
||||
|
@ -400,7 +400,8 @@ body: |
|
||||
; CHECK-LABEL: name: aa_scope
|
||||
; CHECK: %xmm0 = MOVSSrm %rsi, 1, _, 0, _ :: (load 4 from %ir.c, !alias.scope !9)
|
||||
%xmm0 = MOVSSrm %rsi, 1, _, 0, _ :: (load 4 from %ir.c, !alias.scope !9)
|
||||
MOVSSmr %rdi, 1, _, 20, _, killed %xmm0 :: (store 4 into %ir.arrayidx.i)
|
||||
; CHECK-NEXT: MOVSSmr %rdi, 1, _, 20, _, killed %xmm0 :: (store 4 into %ir.arrayidx.i, !noalias !9)
|
||||
MOVSSmr %rdi, 1, _, 20, _, killed %xmm0 :: (store 4 into %ir.arrayidx.i, !noalias !9)
|
||||
%xmm0 = MOVSSrm killed %rsi, 1, _, 0, _ :: (load 4 from %ir.c)
|
||||
MOVSSmr killed %rdi, 1, _, 28, _, killed %xmm0 :: (store 4 into %ir.arrayidx)
|
||||
RETQ
|
||||
|
Loading…
Reference in New Issue
Block a user