mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 19:52:54 +01:00
continue xform function parsing
llvm-svn: 23338
This commit is contained in:
parent
abc740453c
commit
9bb7fff501
@ -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