Add an option to not print the alias of an instruction. It defaults to "print
[oota-llvm.git] / utils / TableGen / AsmWriterEmitter.cpp
index 05bc113c374e82e25c8aff5464db358ff3d2afbd..f9686fd9b5ad3f54e0fe763e38955743d5057558 100644 (file)
@@ -840,6 +840,8 @@ void AsmWriterEmitter::EmitPrintAliasInstruction(raw_ostream &O) {
          I = AllInstAliases.begin(), E = AllInstAliases.end(); I != E; ++I) {
     CodeGenInstAlias *Alias = new CodeGenInstAlias(*I, Target);
     const Record *R = *I;
+    if (!R->getValueAsBit("EmitAlias"))
+      continue; // We were told not to emit the alias, but to emit the aliasee.
     const DagInit *DI = R->getValueAsDag("ResultInst");
     const DefInit *Op = dynamic_cast<const DefInit*>(DI->getOperator());
     AliasMap[getQualifiedName(Op->getDef())].push_back(Alias);