[llvm-commits] CVS: llvm/lib/Target/X86/X86ATTAsmPrinter.cpp X86AsmPrinter.cpp X86AsmPrinter.h X86CodeEmitter.cpp X86FloatingPoint.cpp X86ISelDAGToDAG.cpp X86IntelAsmPrinter.cpp

Chris Lattner sabre at nondot.org
Tue Dec 19 14:59:49 PST 2006



Changes in directory llvm/lib/Target/X86:

X86ATTAsmPrinter.cpp updated: 1.79 -> 1.80
X86AsmPrinter.cpp updated: 1.222 -> 1.223
X86AsmPrinter.h updated: 1.39 -> 1.40
X86CodeEmitter.cpp updated: 1.127 -> 1.128
X86FloatingPoint.cpp updated: 1.66 -> 1.67
X86ISelDAGToDAG.cpp updated: 1.139 -> 1.140
X86IntelAsmPrinter.cpp updated: 1.66 -> 1.67
---
Log message:

eliminate static ctors for Statistic objects.


---
Diffs of the changes:  (+18 -21)

 X86ATTAsmPrinter.cpp   |    4 ++++
 X86AsmPrinter.cpp      |    4 ----
 X86AsmPrinter.h        |    3 ---
 X86CodeEmitter.cpp     |    6 ++----
 X86FloatingPoint.cpp   |    8 ++++----
 X86ISelDAGToDAG.cpp    |   10 ++++------
 X86IntelAsmPrinter.cpp |    4 ++++
 7 files changed, 18 insertions(+), 21 deletions(-)


Index: llvm/lib/Target/X86/X86ATTAsmPrinter.cpp
diff -u llvm/lib/Target/X86/X86ATTAsmPrinter.cpp:1.79 llvm/lib/Target/X86/X86ATTAsmPrinter.cpp:1.80
--- llvm/lib/Target/X86/X86ATTAsmPrinter.cpp:1.79	Sun Dec 17 21:37:18 2006
+++ llvm/lib/Target/X86/X86ATTAsmPrinter.cpp	Tue Dec 19 16:59:26 2006
@@ -13,6 +13,7 @@
 //
 //===----------------------------------------------------------------------===//
 
+#define DEBUG_TYPE "asm-printer"
 #include "X86ATTAsmPrinter.h"
 #include "X86.h"
 #include "X86MachineFunctionInfo.h"
@@ -23,8 +24,11 @@
 #include "llvm/Support/Mangler.h"
 #include "llvm/Target/TargetAsmInfo.h"
 #include "llvm/Target/TargetOptions.h"
+#include "llvm/ADT/Statistic.h"
 using namespace llvm;
 
+STATISTIC(EmittedInsts, "Number of machine instrs printed");
+
 /// getSectionForFunction - Return the section that we should emit the
 /// specified function body into.
 std::string X86ATTAsmPrinter::getSectionForFunction(const Function &F) const {


Index: llvm/lib/Target/X86/X86AsmPrinter.cpp
diff -u llvm/lib/Target/X86/X86AsmPrinter.cpp:1.222 llvm/lib/Target/X86/X86AsmPrinter.cpp:1.223
--- llvm/lib/Target/X86/X86AsmPrinter.cpp:1.222	Sun Dec 17 21:37:18 2006
+++ llvm/lib/Target/X86/X86AsmPrinter.cpp	Tue Dec 19 16:59:26 2006
@@ -27,12 +27,8 @@
 #include "llvm/Assembly/Writer.h"
 #include "llvm/Support/Mangler.h"
 #include "llvm/Target/TargetAsmInfo.h"
-
 using namespace llvm;
 
-Statistic llvm::EmittedInsts("asm-printer",
-                               "Number of machine instrs printed");
-
 static X86FunctionInfo calculateFunctionInfo(const Function *F,
                                              const TargetData *TD) {
   X86FunctionInfo Info;


Index: llvm/lib/Target/X86/X86AsmPrinter.h
diff -u llvm/lib/Target/X86/X86AsmPrinter.h:1.39 llvm/lib/Target/X86/X86AsmPrinter.h:1.40
--- llvm/lib/Target/X86/X86AsmPrinter.h:1.39	Sun Dec 17 21:37:18 2006
+++ llvm/lib/Target/X86/X86AsmPrinter.h	Tue Dec 19 16:59:26 2006
@@ -22,15 +22,12 @@
 #include "llvm/CodeGen/AsmPrinter.h"
 #include "llvm/CodeGen/DwarfWriter.h"
 #include "llvm/CodeGen/MachineDebugInfo.h"
-#include "llvm/ADT/Statistic.h"
 #include "llvm/Support/Compiler.h"
 #include <set>
 
 
 namespace llvm {
 
-extern Statistic EmittedInsts;
-
 // FIXME: Move this to CodeGen/AsmPrinter.h
 namespace PICStyle {
   enum X86AsmPICStyle {


Index: llvm/lib/Target/X86/X86CodeEmitter.cpp
diff -u llvm/lib/Target/X86/X86CodeEmitter.cpp:1.127 llvm/lib/Target/X86/X86CodeEmitter.cpp:1.128
--- llvm/lib/Target/X86/X86CodeEmitter.cpp:1.127	Wed Dec  6 11:46:32 2006
+++ llvm/lib/Target/X86/X86CodeEmitter.cpp	Tue Dec 19 16:59:26 2006
@@ -12,6 +12,7 @@
 //
 //===----------------------------------------------------------------------===//
 
+#define DEBUG_TYPE "x86-emitter"
 #include "X86InstrInfo.h"
 #include "X86Subtarget.h"
 #include "X86TargetMachine.h"
@@ -28,10 +29,7 @@
 #include "llvm/Target/TargetOptions.h"
 using namespace llvm;
 
-namespace {
-  Statistic
-  NumEmitted("x86-emitter", "Number of machine instructions emitted");
-}
+STATISTIC(NumEmitted, "Number of machine instructions emitted");
 
 namespace {
   class VISIBILITY_HIDDEN Emitter : public MachineFunctionPass {


Index: llvm/lib/Target/X86/X86FloatingPoint.cpp
diff -u llvm/lib/Target/X86/X86FloatingPoint.cpp:1.66 llvm/lib/Target/X86/X86FloatingPoint.cpp:1.67
--- llvm/lib/Target/X86/X86FloatingPoint.cpp:1.66	Thu Dec  7 23:41:26 2006
+++ llvm/lib/Target/X86/X86FloatingPoint.cpp	Tue Dec 19 16:59:26 2006
@@ -28,7 +28,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#define DEBUG_TYPE "fp"
+#define DEBUG_TYPE "x86-codegen"
 #include "X86.h"
 #include "X86InstrInfo.h"
 #include "llvm/CodeGen/MachineFunctionPass.h"
@@ -47,10 +47,10 @@
 #include <set>
 using namespace llvm;
 
-namespace {
-  Statistic NumFXCH("x86-codegen", "Number of fxch instructions inserted");
-  Statistic NumFP  ("x86-codegen", "Number of floating point instructions");
+STATISTIC(NumFXCH, "Number of fxch instructions inserted");
+STATISTIC(NumFP  , "Number of floating point instructions");
 
+namespace {
   struct VISIBILITY_HIDDEN FPS : public MachineFunctionPass {
     virtual bool runOnMachineFunction(MachineFunction &MF);
 


Index: llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
diff -u llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.139 llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.140
--- llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.139	Tue Dec 19 15:31:42 2006
+++ llvm/lib/Target/X86/X86ISelDAGToDAG.cpp	Tue Dec 19 16:59:26 2006
@@ -38,6 +38,10 @@
 #include <set>
 using namespace llvm;
 
+STATISTIC(NumFPKill   , "Number of FP_REG_KILL instructions added");
+STATISTIC(NumLoadMoved, "Number of loads moved below TokenFactor");
+
+
 //===----------------------------------------------------------------------===//
 //                      Pattern Matcher Implementation
 //===----------------------------------------------------------------------===//
@@ -75,12 +79,6 @@
 }
 
 namespace {
-  Statistic
-  NumFPKill("x86-codegen", "Number of FP_REG_KILL instructions added");
-
-  Statistic
-  NumLoadMoved("x86-codegen", "Number of loads moved below TokenFactor");
-
   //===--------------------------------------------------------------------===//
   /// ISel - X86 specific code to select X86 machine instructions for
   /// SelectionDAG operations.


Index: llvm/lib/Target/X86/X86IntelAsmPrinter.cpp
diff -u llvm/lib/Target/X86/X86IntelAsmPrinter.cpp:1.66 llvm/lib/Target/X86/X86IntelAsmPrinter.cpp:1.67
--- llvm/lib/Target/X86/X86IntelAsmPrinter.cpp:1.66	Tue Dec 19 15:04:20 2006
+++ llvm/lib/Target/X86/X86IntelAsmPrinter.cpp	Tue Dec 19 16:59:26 2006
@@ -13,6 +13,7 @@
 //
 //===----------------------------------------------------------------------===//
 
+#define DEBUG_TYPE "asm-printer"
 #include "X86IntelAsmPrinter.h"
 #include "X86TargetAsmInfo.h"
 #include "X86.h"
@@ -23,8 +24,11 @@
 #include "llvm/Support/Mangler.h"
 #include "llvm/Target/TargetAsmInfo.h"
 #include "llvm/Target/TargetOptions.h"
+#include "llvm/ADT/Statistic.h"
 using namespace llvm;
 
+STATISTIC(EmittedInsts, "Number of machine instrs printed");
+
 std::string X86IntelAsmPrinter::getSectionForFunction(const Function &F) const {
   // Intel asm always emits functions to _text.
   return "_text";






More information about the llvm-commits mailing list