Fix a minor bug, add comments
authorChris Lattner <sabre@nondot.org>
Fri, 16 Sep 2005 00:29:46 +0000 (00:29 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 16 Sep 2005 00:29:46 +0000 (00:29 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23370 91177308-0d34-0410-b5e6-96231b3b80d8

utils/TableGen/DAGISelEmitter.cpp

index 79ef2311c3d7711f9cc8096236c4264f58cbee0b..d0aac0b51a21cbd6f442755600387df57ed26dbd 100644 (file)
@@ -697,7 +697,7 @@ static bool HandleUse(TreePattern *I, TreePatternNode *Pat,
   } else {
     Record *SlotRec;
     if (Slot->isLeaf()) {
-      Rec = dynamic_cast<DefInit*>(Slot->getLeafValue())->getDef();
+      SlotRec = dynamic_cast<DefInit*>(Slot->getLeafValue())->getDef();
     } else {
       assert(Slot->getNumChildren() == 0 && "can't be a use with children!");
       SlotRec = Slot->getOperator();
@@ -1018,13 +1018,16 @@ void DAGISelEmitter::run(std::ostream &OS) {
   OS << "// *** NOTE: This file is #included into the middle of the target\n"
      << "// *** instruction selector class.  These functions are really "
      << "methods.\n\n";
+  
   ParseNodeInfo();
   ParseNodeTransforms(OS);
   ParsePatternFragments(OS);
   ParseInstructions();
   ParsePatterns();
 
-  // TODO: convert some instructions to expanders if needed or something.
+  // At this point, we have full information about the 'Patterns' we need to
+  // parse, both implicitly from instructions as well as from explicit pattern
+  // definitions.
   
   EmitInstructionSelector(OS);