mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
continue xform function parsing
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23338 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
24eeeb8c3e
commit
6de8b53230
@ -509,7 +509,7 @@ void DAGISelEmitter::ParseNodeTransforms(std::ostream &OS) {
|
||||
SDNodeXForms.insert(std::make_pair(XFormNode,
|
||||
std::make_pair(SDNode, Code)));
|
||||
|
||||
if (!Code.empty()) {
|
||||
if (0 && !Code.empty()) {
|
||||
std::string ClassName = getSDNodeInfo(SDNode).getSDClassName();
|
||||
const char *C2 = ClassName == "SDNode" ? "N" : "inN";
|
||||
|
||||
@ -592,6 +592,12 @@ void DAGISelEmitter::ParseAndResolvePatternFragments(std::ostream &OS) {
|
||||
OS << Code << "\n}\n";
|
||||
P->getOnlyTree()->setPredicateFn("Predicate_"+Fragments[i]->getName());
|
||||
}
|
||||
|
||||
// If there is a node transformation corresponding to this, keep track of
|
||||
// it.
|
||||
Record *Transform = Fragments[i]->getValueAsDef("OperandTransform");
|
||||
if (!getSDNodeTransform(Transform).second.empty()) // not noop xform?
|
||||
P->getOnlyTree()->setTransformFn("Transform_"+Transform->getName());
|
||||
}
|
||||
|
||||
OS << "\n\n";
|
||||
|
@ -302,6 +302,11 @@ public:
|
||||
return PatternFragments.find(R)->second;
|
||||
}
|
||||
|
||||
const std::pair<Record*, std::string> &getSDNodeTransform(Record *R) const {
|
||||
assert(SDNodeXForms.count(R) && "Invalid transform!");
|
||||
return SDNodeXForms.find(R)->second;
|
||||
}
|
||||
|
||||
private:
|
||||
void ParseNodeInfo();
|
||||
void ParseNodeTransforms(std::ostream &OS);
|
||||
|
Loading…
Reference in New Issue
Block a user