memoize the assert results

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23457 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2005-09-26 22:10:24 +00:00
parent 3748147aaf
commit fab3728801

View File

@ -1230,8 +1230,11 @@ void DAGISelEmitter::EmitInstructionSelector(std::ostream &OS) {
<< " case ISD::EntryToken: // These leaves remain the same.\n"
<< " return N;\n"
<< " case ISD::AssertSext:\n"
<< " case ISD::AssertZext:\n"
<< " return Select(N.getOperand(0));\n";
<< " case ISD::AssertZext: {\n"
<< " SDOperand Tmp0 = Select(N.getOperand(0));\n"
<< " if (!N.Val->hasOneUse()) CodeGenMap[N] = Tmp0;\n"
<< " return Tmp0;\n"
<< " }\n";
// Group the patterns by their top-level opcodes.
std::map<Record*, std::vector<PatternToMatch*>,