Can't trust NodeDepth when checking for possibility of load folding creating

a cycle. This increase the search space and will increase compile time (in
practice it appears to be small, e.g. 176.gcc goes from 62 sec to 65 sec)
that will be addressed later.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28476 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Evan Cheng 2006-05-25 20:16:55 +00:00
parent 6b5783d0b1
commit 553ef1be94

View File

@ -3481,13 +3481,11 @@ void DAGISelEmitter::run(std::ostream &OS) {
OS << " if (found || !Visited.insert(Use).second) return;\n";
OS << " for (unsigned i = 0, e = Use->getNumOperands(); i != e; ++i) {\n";
OS << " SDNode *N = Use->getOperand(i).Val;\n";
OS << " if (N->getNodeDepth() >= Def->getNodeDepth()) {\n";
OS << " if (N != Def) {\n";
OS << " findNonImmUse(N, Def, found, Visited);\n";
OS << " } else {\n";
OS << " found = true;\n";
OS << " break;\n";
OS << " }\n";
OS << " if (N != Def) {\n";
OS << " findNonImmUse(N, Def, found, Visited);\n";
OS << " } else {\n";
OS << " found = true;\n";
OS << " break;\n";
OS << " }\n";
OS << " }\n";
OS << "}\n";