diff options
| author | Chris Lattner <sabre@nondot.org> | 2006-11-16 18:13:49 +0000 | 
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2006-11-16 18:13:49 +0000 | 
| commit | 96d73860068e29ca424f4f4ccdb94e369c3ab3f8 (patch) | |
| tree | ca8b47e23053307122948a3562ed3db38b74b0bb /llvm | |
| parent | ae2a3097e6f8886dea6a9b8a732837df79dbe25c (diff) | |
| download | bcm5719-llvm-96d73860068e29ca424f4f4ccdb94e369c3ab3f8.tar.gz bcm5719-llvm-96d73860068e29ca424f4f4ccdb94e369c3ab3f8.zip  | |
add a statistic
llvm-svn: 31785
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/lib/Target/PowerPC/PPCBranchSelector.cpp | 7 | 
1 files changed, 6 insertions, 1 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCBranchSelector.cpp b/llvm/lib/Target/PowerPC/PPCBranchSelector.cpp index 10efb9882a5..123edb781d9 100644 --- a/llvm/lib/Target/PowerPC/PPCBranchSelector.cpp +++ b/llvm/lib/Target/PowerPC/PPCBranchSelector.cpp @@ -19,12 +19,16 @@  #include "PPCInstrBuilder.h"  #include "PPCInstrInfo.h"  #include "llvm/CodeGen/MachineFunctionPass.h" -#include "llvm/Support/Compiler.h"  #include "llvm/Target/TargetMachine.h"  #include "llvm/Target/TargetAsmInfo.h" +#include "llvm/ADT/Statistic.h" +#include "llvm/Support/Compiler.h"  #include <map>  using namespace llvm; +static Statistic<> NumExpanded("ppc-branch-select", +                               "Num branches expanded to long format"); +  namespace {    struct VISIBILITY_HIDDEN PPCBSel : public MachineFunctionPass {      /// OffsetMap - Mapping between BB and byte offset from start of function. @@ -131,6 +135,7 @@ bool PPCBSel::runOnMachineFunction(MachineFunction &Fn) {            BuildMI(*MBB, MBBJ, Opcode, 2).addReg(CRReg).addMBB(trueMBB);          } else {            // Long branch, skip next branch instruction (i.e. $PC+8). +          ++NumExpanded;            BuildMI(*MBB, MBBJ, Inverted, 2).addReg(CRReg).addImm(2);            BuildMI(*MBB, MBBJ, PPC::B, 1).addMBB(trueMBB);          }  | 

