mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
fix a tblgen bug that Evan ran into, where we would lose the '$src' name
on patterns like "(set R32:$dst, (i32 imm:$src))" git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24383 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
7a12537843
commit
12cf9090a4
@ -631,9 +631,7 @@ TreePatternNode *TreePattern::ParseTreePattern(DagInit *Dag) {
|
||||
if (R->isSubClassOf("SDNode") || R->isSubClassOf("PatFrag")) {
|
||||
Dag->setArg(0, new DagInit(R,
|
||||
std::vector<std::pair<Init*, std::string> >()));
|
||||
TreePatternNode *TPN = ParseTreePattern(Dag);
|
||||
TPN->setName(Dag->getArgName(0));
|
||||
return TPN;
|
||||
return ParseTreePattern(Dag);
|
||||
}
|
||||
|
||||
New = new TreePatternNode(DI);
|
||||
@ -651,6 +649,7 @@ TreePatternNode *TreePattern::ParseTreePattern(DagInit *Dag) {
|
||||
|
||||
// Apply the type cast.
|
||||
New->UpdateNodeType(getValueType(Operator), *this);
|
||||
New->setName(Dag->getArgName(0));
|
||||
return New;
|
||||
}
|
||||
|
||||
@ -672,7 +671,8 @@ TreePatternNode *TreePattern::ParseTreePattern(DagInit *Dag) {
|
||||
Init *Arg = Dag->getArg(i);
|
||||
if (DagInit *DI = dynamic_cast<DagInit*>(Arg)) {
|
||||
Children.push_back(ParseTreePattern(DI));
|
||||
Children.back()->setName(Dag->getArgName(i));
|
||||
if (Children.back()->getName().empty())
|
||||
Children.back()->setName(Dag->getArgName(i));
|
||||
} else if (DefInit *DefI = dynamic_cast<DefInit*>(Arg)) {
|
||||
Record *R = DefI->getDef();
|
||||
// Direct reference to a leaf DagNode or PatFrag? Turn it into a
|
||||
|
Loading…
Reference in New Issue
Block a user