[llvm-commits] CVS: llvm/utils/TableGen/InstrInfoEmitter.cpp

Jim Laskey jlaskey at apple.com
Fri Jul 21 14:15:33 PDT 2006



Changes in directory llvm/utils/TableGen:

InstrInfoEmitter.cpp updated: 1.44 -> 1.45
---
Log message:

Eliminate data relocations by using NULL instead of global empty list.


---
Diffs of the changes:  (+2 -5)

 InstrInfoEmitter.cpp |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)


Index: llvm/utils/TableGen/InstrInfoEmitter.cpp
diff -u llvm/utils/TableGen/InstrInfoEmitter.cpp:1.44 llvm/utils/TableGen/InstrInfoEmitter.cpp:1.45
--- llvm/utils/TableGen/InstrInfoEmitter.cpp:1.44	Fri Jul 21 15:57:35 2006
+++ llvm/utils/TableGen/InstrInfoEmitter.cpp	Fri Jul 21 16:15:20 2006
@@ -97,9 +97,6 @@
   const std::string &TargetName = Target.getName();
   Record *InstrInfo = Target.getInstructionSet();
 
-  // Emit empty implicit uses and defs lists
-  OS << "static const unsigned EmptyImpList[] = { 0 };\n";
-
   // Keep track of all of the def lists we have emitted already.
   std::map<std::vector<Record*>, unsigned> EmittedLists;
   unsigned ListNumber = 0;
@@ -239,13 +236,13 @@
   // Emit the implicit uses and defs lists...
   std::vector<Record*> UseList = Inst.TheDef->getValueAsListOfDefs("Uses");
   if (UseList.empty())
-    OS << "EmptyImpList, ";
+    OS << "NULL, ";
   else
     OS << "ImplicitList" << EmittedLists[UseList] << ", ";
 
   std::vector<Record*> DefList = Inst.TheDef->getValueAsListOfDefs("Defs");
   if (DefList.empty())
-    OS << "EmptyImpList, ";
+    OS << "NULL, ";
   else
     OS << "ImplicitList" << EmittedLists[DefList] << ", ";
 






More information about the llvm-commits mailing list