[llvm-commits] CVS: llvm/utils/TableGen/DAGISelEmitter.cpp
Chris Lattner
lattner at cs.uiuc.edu
Mon Sep 26 15:10:35 PDT 2005
Changes in directory llvm/utils/TableGen:
DAGISelEmitter.cpp updated: 1.43 -> 1.44
---
Log message:
memoize the assert results
---
Diffs of the changes: (+5 -2)
DAGISelEmitter.cpp | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
Index: llvm/utils/TableGen/DAGISelEmitter.cpp
diff -u llvm/utils/TableGen/DAGISelEmitter.cpp:1.43 llvm/utils/TableGen/DAGISelEmitter.cpp:1.44
--- llvm/utils/TableGen/DAGISelEmitter.cpp:1.43 Mon Sep 26 16:59:35 2005
+++ llvm/utils/TableGen/DAGISelEmitter.cpp Mon Sep 26 17:10:24 2005
@@ -1230,8 +1230,11 @@
<< " 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*>,
More information about the llvm-commits
mailing list