Changes in directory llvm/lib/Transforms/Utils:
BreakCriticalEdges.cpp updated: 1.37 -> 1.38 LCSSA.cpp updated: 1.31 -> 1.32 LoopSimplify.cpp updated: 1.78 -> 1.79 LowerAllocations.cpp updated: 1.67 -> 1.68 LowerInvoke.cpp updated: 1.46 -> 1.47 LowerSelect.cpp updated: 1.8 -> 1.9 LowerSwitch.cpp updated: 1.29 -> 1.30 Mem2Reg.cpp updated: 1.21 -> 1.22 --- Log message: switch more statistics over to STATISTIC, eliminating static ctors. Also, delete some dead ones. --- Diffs of the changes: (+23 -27) BreakCriticalEdges.cpp | 5 +++-- LCSSA.cpp | 7 +++---- LoopSimplify.cpp | 9 ++++----- LowerAllocations.cpp | 5 +++-- LowerInvoke.cpp | 13 +++++++------ LowerSelect.cpp | 3 --- LowerSwitch.cpp | 3 --- Mem2Reg.cpp | 5 +++-- 8 files changed, 23 insertions(+), 27 deletions(-) Index: llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp diff -u llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp:1.37 llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp:1.38 --- llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp:1.37 Wed Dec 6 11:46:33 2006 +++ llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp Tue Dec 19 16:17:40 2006 @@ -16,6 +16,7 @@ // //===----------------------------------------------------------------------===// +#define DEBUG_TYPE "break-crit-edges" #include "llvm/Transforms/Scalar.h" #include "llvm/Transforms/Utils/BasicBlockUtils.h" #include "llvm/Analysis/Dominators.h" @@ -29,9 +30,9 @@ #include "llvm/ADT/Statistic.h" using namespace llvm; -namespace { - Statistic NumBroken("break-crit-edges", "Number of blocks inserted"); +STATISTIC(NumBroken, "Number of blocks inserted"); +namespace { struct VISIBILITY_HIDDEN BreakCriticalEdges : public FunctionPass { virtual bool runOnFunction(Function &F); Index: llvm/lib/Transforms/Utils/LCSSA.cpp diff -u llvm/lib/Transforms/Utils/LCSSA.cpp:1.31 llvm/lib/Transforms/Utils/LCSSA.cpp:1.32 --- llvm/lib/Transforms/Utils/LCSSA.cpp:1.31 Wed Dec 6 11:46:33 2006 +++ llvm/lib/Transforms/Utils/LCSSA.cpp Tue Dec 19 16:17:40 2006 @@ -27,6 +27,7 @@ // //===----------------------------------------------------------------------===// +#define DEBUG_TYPE "lcssa" #include "llvm/Transforms/Scalar.h" #include "llvm/Constants.h" #include "llvm/Pass.h" @@ -39,13 +40,11 @@ #include "llvm/Support/CFG.h" #include <algorithm> #include <map> - using namespace llvm; +STATISTIC(NumLCSSA, "Number of live out of a loop variables"); + namespace { - static Statistic NumLCSSA("lcssa", - "Number of live out of a loop variables"); - struct LCSSA : public FunctionPass { // Cached analysis information for the current function. LoopInfo *LI; Index: llvm/lib/Transforms/Utils/LoopSimplify.cpp diff -u llvm/lib/Transforms/Utils/LoopSimplify.cpp:1.78 llvm/lib/Transforms/Utils/LoopSimplify.cpp:1.79 --- llvm/lib/Transforms/Utils/LoopSimplify.cpp:1.78 Wed Dec 6 11:46:33 2006 +++ llvm/lib/Transforms/Utils/LoopSimplify.cpp Tue Dec 19 16:17:40 2006 @@ -32,6 +32,7 @@ // //===----------------------------------------------------------------------===// +#define DEBUG_TYPE "loopsimplify" #include "llvm/Transforms/Scalar.h" #include "llvm/Constant.h" #include "llvm/Instructions.h" @@ -48,12 +49,10 @@ #include "llvm/ADT/DepthFirstIterator.h" using namespace llvm; -namespace { - Statistic - NumInserted("loopsimplify", "Number of pre-header or exit blocks inserted"); - Statistic - NumNested("loopsimplify", "Number of nested loops split out"); +STATISTIC(NumInserted, "Number of pre-header or exit blocks inserted"); +STATISTIC(NumNested , "Number of nested loops split out"); +namespace { struct VISIBILITY_HIDDEN LoopSimplify : public FunctionPass { // AA - If we have an alias analysis object to update, this is it, otherwise // this is null. Index: llvm/lib/Transforms/Utils/LowerAllocations.cpp diff -u llvm/lib/Transforms/Utils/LowerAllocations.cpp:1.67 llvm/lib/Transforms/Utils/LowerAllocations.cpp:1.68 --- llvm/lib/Transforms/Utils/LowerAllocations.cpp:1.67 Tue Dec 12 18:50:17 2006 +++ llvm/lib/Transforms/Utils/LowerAllocations.cpp Tue Dec 19 16:17:40 2006 @@ -12,6 +12,7 @@ // //===----------------------------------------------------------------------===// +#define DEBUG_TYPE "lowerallocs" #include "llvm/Transforms/Scalar.h" #include "llvm/Transforms/Utils/UnifyFunctionExitNodes.h" #include "llvm/Module.h" @@ -24,9 +25,9 @@ #include "llvm/Support/Compiler.h" using namespace llvm; -namespace { - Statistic NumLowered("lowerallocs", "Number of allocations lowered"); +STATISTIC(NumLowered, "Number of allocations lowered"); +namespace { /// LowerAllocations - Turn malloc and free instructions into %malloc and /// %free calls. /// Index: llvm/lib/Transforms/Utils/LowerInvoke.cpp diff -u llvm/lib/Transforms/Utils/LowerInvoke.cpp:1.46 llvm/lib/Transforms/Utils/LowerInvoke.cpp:1.47 --- llvm/lib/Transforms/Utils/LowerInvoke.cpp:1.46 Mon Dec 11 23:05:00 2006 +++ llvm/lib/Transforms/Utils/LowerInvoke.cpp Tue Dec 19 16:17:40 2006 @@ -34,6 +34,7 @@ // //===----------------------------------------------------------------------===// +#define DEBUG_TYPE "lowerinvoke" #include "llvm/Transforms/Scalar.h" #include "llvm/Constants.h" #include "llvm/DerivedTypes.h" @@ -49,14 +50,14 @@ #include <csetjmp> using namespace llvm; -namespace { - Statistic NumInvokes("lowerinvoke", "Number of invokes replaced"); - Statistic NumUnwinds("lowerinvoke", "Number of unwinds replaced"); - Statistic NumSpilled("lowerinvoke", - "Number of registers live across unwind edges"); - cl::opt<bool> ExpensiveEHSupport("enable-correct-eh-support", +STATISTIC(NumInvokes, "Number of invokes replaced"); +STATISTIC(NumUnwinds, "Number of unwinds replaced"); +STATISTIC(NumSpilled, "Number of registers live across unwind edges"); + +static cl::opt<bool> ExpensiveEHSupport("enable-correct-eh-support", cl::desc("Make the -lowerinvoke pass insert expensive, but correct, EH code")); +namespace { class VISIBILITY_HIDDEN LowerInvoke : public FunctionPass { // Used for both models. Function *WriteFn; Index: llvm/lib/Transforms/Utils/LowerSelect.cpp diff -u llvm/lib/Transforms/Utils/LowerSelect.cpp:1.8 llvm/lib/Transforms/Utils/LowerSelect.cpp:1.9 --- llvm/lib/Transforms/Utils/LowerSelect.cpp:1.8 Wed Dec 6 11:46:33 2006 +++ llvm/lib/Transforms/Utils/LowerSelect.cpp Tue Dec 19 16:17:40 2006 @@ -24,12 +24,9 @@ #include "llvm/Instructions.h" #include "llvm/Pass.h" #include "llvm/Type.h" -#include "llvm/ADT/Statistic.h" using namespace llvm; namespace { - Statistic NumLowered("lowerselect","Number of select instructions lowered"); - /// LowerSelect - Turn select instructions into conditional branches. /// class LowerSelect : public FunctionPass { Index: llvm/lib/Transforms/Utils/LowerSwitch.cpp diff -u llvm/lib/Transforms/Utils/LowerSwitch.cpp:1.29 llvm/lib/Transforms/Utils/LowerSwitch.cpp:1.30 --- llvm/lib/Transforms/Utils/LowerSwitch.cpp:1.29 Sat Dec 16 23:15:13 2006 +++ llvm/lib/Transforms/Utils/LowerSwitch.cpp Tue Dec 19 16:17:40 2006 @@ -21,13 +21,10 @@ #include "llvm/Pass.h" #include "llvm/Support/Debug.h" #include "llvm/Support/Compiler.h" -#include "llvm/ADT/Statistic.h" #include <algorithm> using namespace llvm; namespace { - Statistic NumLowered("lowerswitch", "Number of SwitchInst's replaced"); - /// LowerSwitch Pass - Replace all SwitchInst instructions with chained branch /// instructions. Note that this cannot be a BasicBlock pass because it /// modifies the CFG! Index: llvm/lib/Transforms/Utils/Mem2Reg.cpp diff -u llvm/lib/Transforms/Utils/Mem2Reg.cpp:1.21 llvm/lib/Transforms/Utils/Mem2Reg.cpp:1.22 --- llvm/lib/Transforms/Utils/Mem2Reg.cpp:1.21 Wed Dec 6 11:46:33 2006 +++ llvm/lib/Transforms/Utils/Mem2Reg.cpp Tue Dec 19 16:17:40 2006 @@ -12,6 +12,7 @@ // //===----------------------------------------------------------------------===// +#define DEBUG_TYPE "mem2reg" #include "llvm/Transforms/Scalar.h" #include "llvm/Transforms/Utils/PromoteMemToReg.h" #include "llvm/Transforms/Utils/UnifyFunctionExitNodes.h" @@ -23,9 +24,9 @@ #include "llvm/Support/Compiler.h" using namespace llvm; -namespace { - Statistic NumPromoted("mem2reg", "Number of alloca's promoted"); +STATISTIC(NumPromoted, "Number of alloca's promoted"); +namespace { struct VISIBILITY_HIDDEN PromotePass : public FunctionPass { // runOnFunction - To run this pass, first we calculate the alloca // instructions that are safe for promotion, then we promote each one. _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits