//
//===----------------------------------------------------------------------===//
+#define DEBUG_TYPE "asm-printer"
#include "ARM.h"
#include "ARMInstrInfo.h"
#include "llvm/Constants.h"
#include <cctype>
using namespace llvm;
-namespace {
- Statistic EmittedInsts("asm-printer", "Number of machine instrs printed");
+STATISTIC(EmittedInsts, "Number of machine instrs printed");
+namespace {
static const char *ARMCondCodeToString(ARMCC::CondCodes CC) {
switch (CC) {
default: assert(0 && "Unknown condition code");
II != E; ++II) {
// Print the assembly for the instruction.
O << "\t";
+ ++EmittedInsts;
printInstruction(II);
}
}
//
//===----------------------------------------------------------------------===//
+#define DEBUG_TYPE "asm-printer"
#include "Alpha.h"
#include "AlphaInstrInfo.h"
#include "AlphaTargetMachine.h"
#include "llvm/ADT/Statistic.h"
using namespace llvm;
+STATISTIC(EmittedInsts, "Number of machine instrs printed");
+
namespace {
- Statistic EmittedInsts("asm-printer", "Number of machine instrs printed");
-
struct VISIBILITY_HIDDEN AlphaAsmPrinter : public AsmPrinter {
/// Unique incrementer for label values for referencing Global values.
//
//===----------------------------------------------------------------------===//
+#define DEBUG_TYPE "alpha-emitter"
#include "AlphaTargetMachine.h"
#include "AlphaRelocations.h"
#include "Alpha.h"
#include "llvm/CodeGen/Passes.h"
#include "llvm/Function.h"
#include "llvm/Support/Debug.h"
-#include "llvm/ADT/Statistic.h"
using namespace llvm;
-namespace {
- Statistic
- NumEmitted("alpha-emitter", "Number of machine instructions emitted");
-}
-
namespace {
class AlphaCodeEmitter : public MachineFunctionPass {
const AlphaInstrInfo *II;
#include "llvm/CodeGen/SelectionDAG.h"
#include "llvm/CodeGen/SelectionDAGISel.h"
#include "llvm/Target/TargetOptions.h"
-#include "llvm/ADT/Statistic.h"
#include "llvm/Constants.h"
#include "llvm/GlobalValue.h"
#include "llvm/Intrinsics.h"
//===----------------------------------------------------------------------===//
//
// Here we check for potential replay traps introduced by the spiller
-// We also align some branch targets if we can do so for free
+// We also align some branch targets if we can do so for free.
+//
//===----------------------------------------------------------------------===//
-
+#define DEBUG_TYPE "alpha-nops"
#include "Alpha.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "llvm/Support/CommandLine.h"
using namespace llvm;
-namespace {
- Statistic nopintro("alpha-nops", "Number of nops inserted");
- Statistic nopalign("alpha-nops-align",
- "Number of nops inserted for alignment");
+STATISTIC(nopintro, "Number of nops inserted");
+STATISTIC(nopalign, "Number of nops inserted for alignment");
+namespace {
cl::opt<bool>
AlignAll("alpha-align-all", cl::Hidden,
cl::desc("Align all blocks"));
//
//===----------------------------------------------------------------------===//
+#define DEBUG_TYPE "asm-printer"
#include "IA64.h"
#include "IA64TargetMachine.h"
#include "llvm/Module.h"
#include "llvm/ADT/Statistic.h"
using namespace llvm;
+STATISTIC(EmittedInsts, "Number of machine instrs printed");
+
namespace {
- Statistic EmittedInsts("asm-printer", "Number of machine instrs printed");
-
struct IA64AsmPrinter : public AsmPrinter {
std::set<std::string> ExternalFunctionNames, ExternalObjectNames;
//
//===----------------------------------------------------------------------===//
+#define DEBUG_TYPE "ia64-codegen"
#include "IA64.h"
#include "IA64InstrInfo.h"
#include "IA64TargetMachine.h"
#include <set>
using namespace llvm;
-namespace {
- Statistic StopBitsAdded("ia64-codegen", "Number of stop bits added");
+STATISTIC(StopBitsAdded, "Number of stop bits added");
+namespace {
struct IA64BundlingPass : public MachineFunctionPass {
/// Target machine description which we query for reg. names, data
/// layout, etc.
//
//===----------------------------------------------------------------------===//
+#define DEBUG_TYPE "ia64-codegen"
#include "IA64.h"
#include "IA64TargetMachine.h"
#include "IA64ISelLowering.h"
#include "llvm/CodeGen/SelectionDAG.h"
#include "llvm/CodeGen/SelectionDAGISel.h"
#include "llvm/Target/TargetOptions.h"
-#include "llvm/ADT/Statistic.h"
#include "llvm/Constants.h"
#include "llvm/GlobalValue.h"
#include "llvm/Intrinsics.h"
using namespace llvm;
namespace {
- Statistic FusedFP ("ia64-codegen", "Number of fused fp operations");
- Statistic FrameOff("ia64-codegen", "Number of frame idx offsets collapsed");
-
//===--------------------------------------------------------------------===//
/// IA64DAGToDAGISel - IA64 specific code to select IA64 machine
/// instructions for SelectionDAG operations.
#include <set>
using namespace llvm;
-namespace {
- Statistic EmittedInsts("asm-printer", "Number of machine instrs printed");
+STATISTIC(EmittedInsts, "Number of machine instrs printed");
+namespace {
struct VISIBILITY_HIDDEN PPCAsmPrinter : public AsmPrinter {
std::set<std::string> FnStubs, GVStubs;
const PPCSubtarget &Subtarget;
//
//===----------------------------------------------------------------------===//
+#define DEBUG_TYPE "ppc-branch-select"
#include "PPC.h"
#include "PPCInstrBuilder.h"
#include "PPCInstrInfo.h"
#include "llvm/Support/MathExtras.h"
using namespace llvm;
-static Statistic NumExpanded("ppc-branch-select",
- "Num branches expanded to long format");
+STATISTIC(NumExpanded, "Number of branches expanded to long format");
namespace {
struct VISIBILITY_HIDDEN PPCBSel : public MachineFunctionPass {
//
//===----------------------------------------------------------------------===//
+#define DEBUG_TYPE "ppc-codegen"
#include "PPC.h"
#include "PPCPredicates.h"
#include "PPCTargetMachine.h"
#include "llvm/CodeGen/SelectionDAG.h"
#include "llvm/CodeGen/SelectionDAGISel.h"
#include "llvm/Target/TargetOptions.h"
-#include "llvm/ADT/Statistic.h"
#include "llvm/Constants.h"
#include "llvm/GlobalValue.h"
#include "llvm/Intrinsics.h"
using namespace llvm;
namespace {
- Statistic FrameOff("ppc-codegen", "Number of frame idx offsets collapsed");
-
//===--------------------------------------------------------------------===//
/// PPCDAGToDAGISel - PPC specific code to select PPC machine
/// instructions for SelectionDAG operations.
//
//===----------------------------------------------------------------------===//
+#define DEBUG_TYPE "delayslotfiller"
#include "Sparc.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "llvm/ADT/Statistic.h"
using namespace llvm;
-namespace {
- Statistic FilledSlots("delayslotfiller", "Num. of delay slots filled");
+STATISTIC(FilledSlots, "Number of delay slots filled");
+namespace {
struct Filler : public MachineFunctionPass {
/// Target machine description which we query for reg. names, data
/// layout, etc.
//
//===----------------------------------------------------------------------===//
+#define DEBUG_TYPE "fpmover"
#include "Sparc.h"
#include "SparcSubtarget.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
#include "llvm/Support/Debug.h"
using namespace llvm;
-namespace {
- Statistic NumFpDs("fpmover", "Number of instructions translated");
- Statistic NoopFpDs("fpmover", "Number of noop instructions removed");
+STATISTIC(NumFpDs , "Number of instructions translated");
+STATISTIC(NoopFpDs, "Number of noop instructions removed");
+namespace {
struct FPMover : public MachineFunctionPass {
/// Target machine description which we query for reg. names, data
/// layout, etc.
//
//===----------------------------------------------------------------------===//
+#define DEBUG_TYPE "asm-printer"
#include "Sparc.h"
#include "SparcInstrInfo.h"
#include "llvm/Constants.h"
#include <cctype>
using namespace llvm;
-namespace {
- Statistic EmittedInsts("asm-printer", "Number of machine instrs printed");
+STATISTIC(EmittedInsts, "Number of machine instrs printed");
+namespace {
struct VISIBILITY_HIDDEN SparcAsmPrinter : public AsmPrinter {
SparcAsmPrinter(std::ostream &O, TargetMachine &TM, const TargetAsmInfo *T)
: AsmPrinter(O, TM, T) {
//
//===----------------------------------------------------------------------===//
+#define DEBUG_TYPE "asm-printer"
#include "X86ATTAsmPrinter.h"
#include "X86.h"
#include "X86MachineFunctionInfo.h"
#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 {
#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;
#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 {
//
//===----------------------------------------------------------------------===//
+#define DEBUG_TYPE "x86-emitter"
#include "X86InstrInfo.h"
#include "X86Subtarget.h"
#include "X86TargetMachine.h"
#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 {
//
//===----------------------------------------------------------------------===//
-#define DEBUG_TYPE "fp"
+#define DEBUG_TYPE "x86-codegen"
#include "X86.h"
#include "X86InstrInfo.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
#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);
#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
//===----------------------------------------------------------------------===//
}
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.
//
//===----------------------------------------------------------------------===//
+#define DEBUG_TYPE "asm-printer"
#include "X86IntelAsmPrinter.h"
#include "X86TargetAsmInfo.h"
#include "X86.h"
#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";