mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-30 15:22:41 +00:00
define a new CodeGenInstAlias. It has an asmstring and operand list for now,
todo: the result field. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117894 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c240bb0ede
commit
c76e80ded7
@ -946,6 +946,15 @@ void AsmMatcherInfo::BuildInfo() {
|
||||
Instructions.push_back(II.take());
|
||||
}
|
||||
|
||||
// Parse all of the InstAlias definitions.
|
||||
std::vector<Record*> AllInstAliases =
|
||||
Records.getAllDerivedDefinitions("InstAlias");
|
||||
for (unsigned i = 0, e = AllInstAliases.size(); i != e; ++i) {
|
||||
CodeGenInstAlias *Alias = new CodeGenInstAlias(AllInstAliases[i]);
|
||||
|
||||
|
||||
(void)Alias;
|
||||
}
|
||||
|
||||
// Build info for the register classes.
|
||||
BuildRegisterClasses(SingletonRegisters);
|
||||
|
@ -382,3 +382,13 @@ FlattenAsmStringVariants(StringRef Cur, unsigned Variant) {
|
||||
return Res;
|
||||
}
|
||||
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
/// CodeGenInstAlias Implementation
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
CodeGenInstAlias::CodeGenInstAlias(Record *R) : TheDef(R), Operands(R) {
|
||||
AsmString = R->getValueAsString("AsmString");
|
||||
|
||||
|
||||
}
|
||||
|
@ -235,6 +235,23 @@ namespace llvm {
|
||||
static std::string FlattenAsmStringVariants(StringRef AsmString,
|
||||
unsigned Variant);
|
||||
};
|
||||
|
||||
|
||||
/// CodeGenInstAlias - This represents an InstAlias definition.
|
||||
class CodeGenInstAlias {
|
||||
public:
|
||||
Record *TheDef; // The actual record defining this InstAlias.
|
||||
|
||||
/// AsmString - The format string used to emit a .s file for the
|
||||
/// instruction.
|
||||
std::string AsmString;
|
||||
|
||||
/// Operands - This is information about the (ins) and (outs) list specified
|
||||
/// to the alias.
|
||||
CGIOperandList Operands;
|
||||
|
||||
CodeGenInstAlias(Record *R);
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user