llvm.org GIT mirror llvm / eef965f
Add an option to not print the alias of an instruction. It defaults to "print the alias". git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129485 91177308-0d34-0410-b5e6-96231b3b80d8 Bill Wendling 9 years ago
3 changed file(s) with 8 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
590590 /// InstAlias - This defines an alternate assembly syntax that is allowed to
591591 /// match an instruction that has a different (more canonical) assembly
592592 /// representation.
593 class InstAlias> {
593 class InstAlias, bit Emit = 0b1> {
594594 string AsmString = Asm; // The .s format to match the instruction with.
595595 dag ResultInst = Result; // The MCInst to generate.
596 bit EmitAlias = Emit; // Emit the alias instead of what's aliased.
596597
597598 // Predicates - Predicates that must be true for this to match.
598599 list Predicates = [];
15331533 def : InstAlias<"movq $imm, $reg", (MOV64ri GR64:$reg, i64imm:$imm)>;
15341534
15351535 // Match 'movq GR64, MMX' as an alias for movd.
1536 def : InstAlias<"movq $src, $dst", (MMX_MOVD64to64rr VR64:$dst, GR64:$src)>;
1537 def : InstAlias<"movq $src, $dst", (MMX_MOVD64from64rr GR64:$dst, VR64:$src)>;
1536 def : InstAlias<"movq $src, $dst",
1537 (MMX_MOVD64to64rr VR64:$dst, GR64:$src), 0b0>;
1538 def : InstAlias<"movq $src, $dst",
1539 (MMX_MOVD64from64rr GR64:$dst, VR64:$src), 0b0>;
15381540
15391541 // movsd with no operands (as opposed to the SSE scalar move of a double) is an
15401542 // alias for movsl. (as in rep; movsd)
839839 I = AllInstAliases.begin(), E = AllInstAliases.end(); I != E; ++I) {
840840 CodeGenInstAlias *Alias = new CodeGenInstAlias(*I, Target);
841841 const Record *R = *I;
842 if (!R->getValueAsBit("EmitAlias"))
843 continue; // We were told not to emit the alias, but to emit the aliasee.
842844 const DagInit *DI = R->getValueAsDag("ResultInst");
843845 const DefInit *Op = dynamic_cast(DI->getOperator());
844846 AliasMap[getQualifiedName(Op->getDef())].push_back(Alias);