mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-18 10:31:57 +00:00
simplify
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118326 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
5abd1ebcb3
commit
9cdf428589
@ -306,9 +306,6 @@ struct MatchableInfo {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/// ResultInst - The result instruction generated.
|
|
||||||
const CodeGenInstruction *ResultInst;
|
|
||||||
|
|
||||||
/// TheDef - This is the definition of the instruction or InstAlias that this
|
/// TheDef - This is the definition of the instruction or InstAlias that this
|
||||||
/// matchable came from.
|
/// matchable came from.
|
||||||
Record *const TheDef;
|
Record *const TheDef;
|
||||||
@ -349,13 +346,11 @@ struct MatchableInfo {
|
|||||||
MatchableInfo(const CodeGenInstruction &CGI)
|
MatchableInfo(const CodeGenInstruction &CGI)
|
||||||
: TheDef(CGI.TheDef), DefRec(&CGI),
|
: TheDef(CGI.TheDef), DefRec(&CGI),
|
||||||
TheOperandList(CGI.Operands), AsmString(CGI.AsmString) {
|
TheOperandList(CGI.Operands), AsmString(CGI.AsmString) {
|
||||||
ResultInst = &CGI;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
MatchableInfo(const CodeGenInstAlias *Alias)
|
MatchableInfo(const CodeGenInstAlias *Alias)
|
||||||
: TheDef(Alias->TheDef), DefRec(Alias), TheOperandList(Alias->Operands),
|
: TheDef(Alias->TheDef), DefRec(Alias), TheOperandList(Alias->Operands),
|
||||||
AsmString(Alias->AsmString) {
|
AsmString(Alias->AsmString) {
|
||||||
ResultInst = Alias->ResultInst;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Initialize(const AsmMatcherInfo &Info,
|
void Initialize(const AsmMatcherInfo &Info,
|
||||||
@ -1821,7 +1816,14 @@ void AsmMatcherEmitter::run(raw_ostream &OS) {
|
|||||||
it != ie; ++it) {
|
it != ie; ++it) {
|
||||||
MatchableInfo &II = **it;
|
MatchableInfo &II = **it;
|
||||||
|
|
||||||
OS << " { " << Target.getName() << "::" << II.ResultInst->TheDef->getName()
|
|
||||||
|
const CodeGenInstruction *ResultInst;
|
||||||
|
if (II.DefRec.is<const CodeGenInstruction*>())
|
||||||
|
ResultInst = II.DefRec.get<const CodeGenInstruction*>();
|
||||||
|
else
|
||||||
|
ResultInst = II.DefRec.get<const CodeGenInstAlias*>()->ResultInst;
|
||||||
|
|
||||||
|
OS << " { " << Target.getName() << "::" << ResultInst->TheDef->getName()
|
||||||
<< ", \"" << II.Mnemonic << "\""
|
<< ", \"" << II.Mnemonic << "\""
|
||||||
<< ", " << II.ConversionFnKind << ", { ";
|
<< ", " << II.ConversionFnKind << ", { ";
|
||||||
for (unsigned i = 0, e = II.AsmOperands.size(); i != e; ++i) {
|
for (unsigned i = 0, e = II.AsmOperands.size(); i != e; ++i) {
|
||||||
|
Loading…
Reference in New Issue
Block a user