[llvm-commits] CVS: llvm/lib/Target/Sparc/SparcV9CodeEmitter.cpp

Brian Gaeke gaeke at cs.uiuc.edu
Mon Oct 13 14:52:01 PDT 2003


Changes in directory llvm/lib/Target/Sparc:

SparcV9CodeEmitter.cpp updated: 1.34 -> 1.35

---
Log message:

Remove WordsEmitted statistic; there's already a non-backend-specific
jello statistic for this (just divide #-bytes-of-code-emitted by 4).

Rewrite head-of-file comment.


---
Diffs of the changes:  (+10 -3)

Index: llvm/lib/Target/Sparc/SparcV9CodeEmitter.cpp
diff -u llvm/lib/Target/Sparc/SparcV9CodeEmitter.cpp:1.34 llvm/lib/Target/Sparc/SparcV9CodeEmitter.cpp:1.35
--- llvm/lib/Target/Sparc/SparcV9CodeEmitter.cpp:1.34	Fri Oct 10 12:47:23 2003
+++ llvm/lib/Target/Sparc/SparcV9CodeEmitter.cpp	Mon Oct 13 14:51:20 2003
@@ -1,6 +1,15 @@
 //===-- SparcV9CodeEmitter.cpp --------------------------------------------===//
 //
-// FIXME: document
+// SPARC-specific backend for emitting machine code to memory.
+//
+// This module also contains the code for lazily resolving the targets
+// of call instructions, including the callback used to redirect calls
+// to functions for which the code has not yet been generated into the
+// JIT compiler.
+//
+// This file #includes SparcV9CodeEmitter.inc, which contains the code
+// for getBinaryCodeForInstr(), a method that converts a MachineInstr
+// into the corresponding binary machine code word.
 //
 //===----------------------------------------------------------------------===//
 
@@ -26,7 +35,6 @@
   Statistic<> OverwrittenCalls("call-ovwr", "Number of over-written calls");
   Statistic<> UnmodifiedCalls("call-skip", "Number of unmodified calls");
   Statistic<> CallbackCalls("callback", "Number CompilationCallback() calls");
-  Statistic<> WordsEmitted("words-emitted", "No. of words emitted to memory");
 }
 
 bool UltraSparc::addPassesToEmitMachineCode(FunctionPassManager &PM,
@@ -442,7 +450,6 @@
 
 void SparcV9CodeEmitter::emitWord(unsigned Val) {
   // Output the constant in big endian byte order...
-  ++WordsEmitted;
   unsigned byteVal;
   for (int i = 3; i >= 0; --i) {
     byteVal = Val >> 8*i;





More information about the llvm-commits mailing list