[llvm-commits] CVS: llvm/lib/Transforms/Scalar/ADCE.cpp BasicBlockPlacement.cpp CondPropagate.cpp ConstantProp.cpp CorrelatedExprs.cpp DCE.cpp DeadStoreElimination.cpp GCSE.cpp IndVarSimplify.cpp LICM.cpp LoopStrengthReduce.cpp LoopUnroll.cpp LoopUnswitch.cpp LowerPacked.cpp Reassociate.cpp Reg2Mem.cpp SCCP.cpp SimplifyCFG.cpp TailDuplication.cpp TailRecursionElimination.cpp

Reid Spencer reid at x10sys.com
Mon Feb 5 15:32:24 PST 2007



Changes in directory llvm/lib/Transforms/Scalar:

ADCE.cpp updated: 1.101 -> 1.102
BasicBlockPlacement.cpp updated: 1.8 -> 1.9
CondPropagate.cpp updated: 1.15 -> 1.16
ConstantProp.cpp updated: 1.55 -> 1.56
CorrelatedExprs.cpp updated: 1.51 -> 1.52
DCE.cpp updated: 1.62 -> 1.63
DeadStoreElimination.cpp updated: 1.16 -> 1.17
GCSE.cpp updated: 1.51 -> 1.52
IndVarSimplify.cpp updated: 1.108 -> 1.109
LICM.cpp updated: 1.86 -> 1.87
LoopStrengthReduce.cpp updated: 1.107 -> 1.108
LoopUnroll.cpp updated: 1.35 -> 1.36
LoopUnswitch.cpp updated: 1.60 -> 1.61
LowerPacked.cpp updated: 1.15 -> 1.16
Reassociate.cpp updated: 1.73 -> 1.74
Reg2Mem.cpp updated: 1.10 -> 1.11
SCCP.cpp updated: 1.161 -> 1.162
SimplifyCFG.cpp updated: 1.18 -> 1.19
TailDuplication.cpp updated: 1.36 -> 1.37
TailRecursionElimination.cpp updated: 1.27 -> 1.28
---
Log message:

Apply the VISIBILITY_HIDDEN field to the remaining anonymous classes in
the Transforms library. This reduces debug library size by 132 KB, debug
binary size by 376 KB, and reduces link time for llvm tools slightly.


---
Diffs of the changes:  (+52 -32)

 ADCE.cpp                     |    3 ++-
 BasicBlockPlacement.cpp      |    3 ++-
 CondPropagate.cpp            |    3 ++-
 ConstantProp.cpp             |    3 ++-
 CorrelatedExprs.cpp          |   11 ++++++-----
 DCE.cpp                      |    3 ++-
 DeadStoreElimination.cpp     |    3 ++-
 GCSE.cpp                     |    3 ++-
 IndVarSimplify.cpp           |    3 ++-
 LICM.cpp                     |    5 +++--
 LoopStrengthReduce.cpp       |    8 ++++----
 LoopUnroll.cpp               |    3 ++-
 LoopUnswitch.cpp             |    5 +++--
 LowerPacked.cpp              |    4 +++-
 Reassociate.cpp              |    5 +++--
 Reg2Mem.cpp                  |    3 ++-
 SCCP.cpp                     |    7 ++++---
 SimplifyCFG.cpp              |    3 ++-
 TailDuplication.cpp          |    3 ++-
 TailRecursionElimination.cpp |    3 ++-
 20 files changed, 52 insertions(+), 32 deletions(-)


Index: llvm/lib/Transforms/Scalar/ADCE.cpp
diff -u llvm/lib/Transforms/Scalar/ADCE.cpp:1.101 llvm/lib/Transforms/Scalar/ADCE.cpp:1.102
--- llvm/lib/Transforms/Scalar/ADCE.cpp:1.101	Tue Dec 19 15:40:18 2006
+++ llvm/lib/Transforms/Scalar/ADCE.cpp	Mon Feb  5 17:32:05 2007
@@ -27,6 +27,7 @@
 #include "llvm/ADT/DepthFirstIterator.h"
 #include "llvm/ADT/Statistic.h"
 #include "llvm/ADT/STLExtras.h"
+#include "llvm/Support/Compiler.h"
 #include <algorithm>
 using namespace llvm;
 
@@ -41,7 +42,7 @@
 // This class does all of the work of Aggressive Dead Code Elimination.
 // It's public interface consists of a constructor and a doADCE() method.
 //
-class ADCE : public FunctionPass {
+class VISIBILITY_HIDDEN ADCE : public FunctionPass {
   Function *Func;                       // The function that we are working on
   std::vector<Instruction*> WorkList;   // Instructions that just became live
   std::set<Instruction*>    LiveSet;    // The set of live instructions


Index: llvm/lib/Transforms/Scalar/BasicBlockPlacement.cpp
diff -u llvm/lib/Transforms/Scalar/BasicBlockPlacement.cpp:1.8 llvm/lib/Transforms/Scalar/BasicBlockPlacement.cpp:1.9
--- llvm/lib/Transforms/Scalar/BasicBlockPlacement.cpp:1.8	Tue Dec 19 15:40:18 2006
+++ llvm/lib/Transforms/Scalar/BasicBlockPlacement.cpp	Mon Feb  5 17:32:05 2007
@@ -31,6 +31,7 @@
 #include "llvm/Function.h"
 #include "llvm/Pass.h"
 #include "llvm/Support/CFG.h"
+#include "llvm/Support/Compiler.h"
 #include "llvm/ADT/Statistic.h"
 #include "llvm/Transforms/Scalar.h"
 #include <set>
@@ -39,7 +40,7 @@
 STATISTIC(NumMoved, "Number of basic blocks moved");
 
 namespace {
-  struct BlockPlacement : public FunctionPass {
+  struct VISIBILITY_HIDDEN BlockPlacement : public FunctionPass {
     virtual bool runOnFunction(Function &F);
 
     virtual void getAnalysisUsage(AnalysisUsage &AU) const {


Index: llvm/lib/Transforms/Scalar/CondPropagate.cpp
diff -u llvm/lib/Transforms/Scalar/CondPropagate.cpp:1.15 llvm/lib/Transforms/Scalar/CondPropagate.cpp:1.16
--- llvm/lib/Transforms/Scalar/CondPropagate.cpp:1.15	Fri Jan 12 12:35:11 2007
+++ llvm/lib/Transforms/Scalar/CondPropagate.cpp	Mon Feb  5 17:32:05 2007
@@ -22,6 +22,7 @@
 #include "llvm/Type.h"
 #include "llvm/ADT/STLExtras.h"
 #include "llvm/ADT/Statistic.h"
+#include "llvm/Support/Compiler.h"
 #include "llvm/Support/Streams.h"
 using namespace llvm;
 
@@ -29,7 +30,7 @@
 STATISTIC(NumSwThread, "Number of CFG edges threaded through switches");
 
 namespace {
-  struct CondProp : public FunctionPass {
+  struct VISIBILITY_HIDDEN CondProp : public FunctionPass {
     virtual bool runOnFunction(Function &F);
 
     virtual void getAnalysisUsage(AnalysisUsage &AU) const {


Index: llvm/lib/Transforms/Scalar/ConstantProp.cpp
diff -u llvm/lib/Transforms/Scalar/ConstantProp.cpp:1.55 llvm/lib/Transforms/Scalar/ConstantProp.cpp:1.56
--- llvm/lib/Transforms/Scalar/ConstantProp.cpp:1.55	Tue Jan 30 17:46:24 2007
+++ llvm/lib/Transforms/Scalar/ConstantProp.cpp	Mon Feb  5 17:32:05 2007
@@ -24,6 +24,7 @@
 #include "llvm/Constant.h"
 #include "llvm/Instruction.h"
 #include "llvm/Pass.h"
+#include "llvm/Support/Compiler.h"
 #include "llvm/Support/InstIterator.h"
 #include "llvm/ADT/Statistic.h"
 #include <set>
@@ -32,7 +33,7 @@
 STATISTIC(NumInstKilled, "Number of instructions killed");
 
 namespace {
-  struct ConstantPropagation : public FunctionPass {
+  struct VISIBILITY_HIDDEN ConstantPropagation : public FunctionPass {
     bool runOnFunction(Function &F);
 
     virtual void getAnalysisUsage(AnalysisUsage &AU) const {


Index: llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp
diff -u llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp:1.51 llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp:1.52
--- llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp:1.51	Tue Jan 30 17:46:24 2007
+++ llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp	Mon Feb  5 17:32:05 2007
@@ -38,8 +38,9 @@
 #include "llvm/Analysis/Dominators.h"
 #include "llvm/Assembly/Writer.h"
 #include "llvm/Transforms/Utils/BasicBlockUtils.h"
-#include "llvm/Support/ConstantRange.h"
 #include "llvm/Support/CFG.h"
+#include "llvm/Support/Compiler.h"
+#include "llvm/Support/ConstantRange.h"
 #include "llvm/Support/Debug.h"
 #include "llvm/ADT/PostOrderIterator.h"
 #include "llvm/ADT/Statistic.h"
@@ -52,7 +53,7 @@
 
 namespace {
   class ValueInfo;
-  class Relation {
+  class VISIBILITY_HIDDEN Relation {
     Value *Val;          // Relation to what value?
     unsigned Rel;        // SetCC or ICmp relation, or Add if no information
   public:
@@ -96,7 +97,7 @@
   // relationships to other values in the program (specified with Relation) that
   // are known to be valid in a region.
   //
-  class ValueInfo {
+  class VISIBILITY_HIDDEN ValueInfo {
     // RelationShips - this value is know to have the specified relationships to
     // other values.  There can only be one entry per value, and this list is
     // kept sorted by the Val field.
@@ -167,7 +168,7 @@
   // the RegionInfo for their dominator, because anything known in a dominator
   // is known to be true in a dominated block as well.
   //
-  class RegionInfo {
+  class VISIBILITY_HIDDEN RegionInfo {
     BasicBlock *BB;
 
     // ValueMap - Tracks the ValueInformation known for this region
@@ -218,7 +219,7 @@
   };
 
   /// CEE - Correlated Expression Elimination
-  class CEE : public FunctionPass {
+  class VISIBILITY_HIDDEN CEE : public FunctionPass {
     std::map<Value*, unsigned> RankMap;
     std::map<BasicBlock*, RegionInfo> RegionInfoMap;
     ETForest *EF;


Index: llvm/lib/Transforms/Scalar/DCE.cpp
diff -u llvm/lib/Transforms/Scalar/DCE.cpp:1.62 llvm/lib/Transforms/Scalar/DCE.cpp:1.63
--- llvm/lib/Transforms/Scalar/DCE.cpp:1.62	Thu Jan 25 17:23:25 2007
+++ llvm/lib/Transforms/Scalar/DCE.cpp	Mon Feb  5 17:32:05 2007
@@ -21,6 +21,7 @@
 #include "llvm/Transforms/Utils/Local.h"
 #include "llvm/Instruction.h"
 #include "llvm/Pass.h"
+#include "llvm/Support/Compiler.h"
 #include "llvm/Support/InstIterator.h"
 #include "llvm/ADT/Statistic.h"
 #include <set>
@@ -33,7 +34,7 @@
   //===--------------------------------------------------------------------===//
   // DeadInstElimination pass implementation
   //
-  struct DeadInstElimination : public BasicBlockPass {
+  struct VISIBILITY_HIDDEN DeadInstElimination : public BasicBlockPass {
     virtual bool runOnBasicBlock(BasicBlock &BB) {
       bool Changed = false;
       for (BasicBlock::iterator DI = BB.begin(); DI != BB.end(); )


Index: llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
diff -u llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp:1.16 llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp:1.17
--- llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp:1.16	Tue Dec 19 15:40:18 2006
+++ llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp	Mon Feb  5 17:32:05 2007
@@ -26,13 +26,14 @@
 #include "llvm/Transforms/Utils/Local.h"
 #include "llvm/ADT/SetVector.h"
 #include "llvm/ADT/Statistic.h"
+#include "llvm/Support/Compiler.h"
 using namespace llvm;
 
 STATISTIC(NumStores, "Number of stores deleted");
 STATISTIC(NumOther , "Number of other instrs removed");
 
 namespace {
-  struct DSE : public FunctionPass {
+  struct VISIBILITY_HIDDEN DSE : public FunctionPass {
 
     virtual bool runOnFunction(Function &F) {
       bool Changed = false;


Index: llvm/lib/Transforms/Scalar/GCSE.cpp
diff -u llvm/lib/Transforms/Scalar/GCSE.cpp:1.51 llvm/lib/Transforms/Scalar/GCSE.cpp:1.52
--- llvm/lib/Transforms/Scalar/GCSE.cpp:1.51	Tue Jan 30 17:46:24 2007
+++ llvm/lib/Transforms/Scalar/GCSE.cpp	Mon Feb  5 17:32:05 2007
@@ -24,6 +24,7 @@
 #include "llvm/Analysis/ValueNumbering.h"
 #include "llvm/ADT/DepthFirstIterator.h"
 #include "llvm/ADT/Statistic.h"
+#include "llvm/Support/Compiler.h"
 #include <algorithm>
 using namespace llvm;
 
@@ -35,7 +36,7 @@
 STATISTIC(NumArgsRepl   , "Number of function arguments replaced "
                           "with constant values");
 namespace {
-  struct GCSE : public FunctionPass {
+  struct VISIBILITY_HIDDEN GCSE : public FunctionPass {
     virtual bool runOnFunction(Function &F);
 
   private:


Index: llvm/lib/Transforms/Scalar/IndVarSimplify.cpp
diff -u llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:1.108 llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:1.109
--- llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:1.108	Wed Jan 31 14:08:52 2007
+++ llvm/lib/Transforms/Scalar/IndVarSimplify.cpp	Mon Feb  5 17:32:05 2007
@@ -46,6 +46,7 @@
 #include "llvm/Analysis/ScalarEvolutionExpander.h"
 #include "llvm/Analysis/LoopInfo.h"
 #include "llvm/Support/CFG.h"
+#include "llvm/Support/Compiler.h"
 #include "llvm/Support/Debug.h"
 #include "llvm/Support/GetElementPtrTypeIterator.h"
 #include "llvm/Transforms/Utils/Local.h"
@@ -61,7 +62,7 @@
 STATISTIC(NumLFTR    , "Number of loop exit tests replaced");
 
 namespace {
-  class IndVarSimplify : public FunctionPass {
+  class VISIBILITY_HIDDEN IndVarSimplify : public FunctionPass {
     LoopInfo        *LI;
     ScalarEvolution *SE;
     bool Changed;


Index: llvm/lib/Transforms/Scalar/LICM.cpp
diff -u llvm/lib/Transforms/Scalar/LICM.cpp:1.86 llvm/lib/Transforms/Scalar/LICM.cpp:1.87
--- llvm/lib/Transforms/Scalar/LICM.cpp:1.86	Thu Feb  1 20:16:22 2007
+++ llvm/lib/Transforms/Scalar/LICM.cpp	Mon Feb  5 17:32:05 2007
@@ -41,8 +41,9 @@
 #include "llvm/Analysis/AliasAnalysis.h"
 #include "llvm/Analysis/AliasSetTracker.h"
 #include "llvm/Analysis/Dominators.h"
-#include "llvm/Support/CFG.h"
 #include "llvm/Transforms/Utils/PromoteMemToReg.h"
+#include "llvm/Support/CFG.h"
+#include "llvm/Support/Compiler.h"
 #include "llvm/Support/CommandLine.h"
 #include "llvm/Support/Debug.h"
 #include "llvm/ADT/Statistic.h"
@@ -60,7 +61,7 @@
   DisablePromotion("disable-licm-promotion", cl::Hidden,
                    cl::desc("Disable memory promotion in LICM pass"));
 
-  struct LICM : public FunctionPass {
+  struct VISIBILITY_HIDDEN LICM : public FunctionPass {
     virtual bool runOnFunction(Function &F);
 
     /// This transformation requires natural loop information & requires that


Index: llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
diff -u llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.107 llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.108
--- llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.107	Sun Jan 14 20:27:26 2007
+++ llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp	Mon Feb  5 17:32:05 2007
@@ -46,7 +46,7 @@
   /// the stride is stored externally.  The Offset member keeps track of the 
   /// offset from the IV, User is the actual user of the operand, and 'Operand'
   /// is the operand # of the User that is the use.
-  struct IVStrideUse {
+  struct VISIBILITY_HIDDEN IVStrideUse {
     SCEVHandle Offset;
     Instruction *User;
     Value *OperandValToReplace;
@@ -66,7 +66,7 @@
   /// have an operand that is based on the trip count multiplied by some stride.
   /// The stride for all of these users is common and kept external to this
   /// structure.
-  struct IVUsersOfOneStride {
+  struct VISIBILITY_HIDDEN IVUsersOfOneStride {
     /// Users - Keep track of all of the users of this stride as well as the
     /// initial value and the operand that uses the IV.
     std::vector<IVStrideUse> Users;
@@ -79,7 +79,7 @@
   /// IVInfo - This structure keeps track of one IV expression inserted during
   /// StrengthReduceStridedIVUsers. It contains the stride, the common base, as
   /// well as the PHI node and increment value created for rewrite.
-  struct IVExpr {
+  struct VISIBILITY_HIDDEN IVExpr {
     SCEVHandle  Stride;
     SCEVHandle  Base;
     PHINode    *PHI;
@@ -95,7 +95,7 @@
 
   /// IVsOfOneStride - This structure keeps track of all IV expression inserted
   /// during StrengthReduceStridedIVUsers for a particular stride of the IV.
-  struct IVsOfOneStride {
+  struct VISIBILITY_HIDDEN IVsOfOneStride {
     std::vector<IVExpr> IVs;
 
     void addIV(const SCEVHandle &Stride, const SCEVHandle &Base, PHINode *PHI,


Index: llvm/lib/Transforms/Scalar/LoopUnroll.cpp
diff -u llvm/lib/Transforms/Scalar/LoopUnroll.cpp:1.35 llvm/lib/Transforms/Scalar/LoopUnroll.cpp:1.36
--- llvm/lib/Transforms/Scalar/LoopUnroll.cpp:1.35	Fri Feb  2 18:08:31 2007
+++ llvm/lib/Transforms/Scalar/LoopUnroll.cpp	Mon Feb  5 17:32:05 2007
@@ -27,6 +27,7 @@
 #include "llvm/Transforms/Utils/Cloning.h"
 #include "llvm/Transforms/Utils/Local.h"
 #include "llvm/Support/CFG.h"
+#include "llvm/Support/Compiler.h"
 #include "llvm/Support/CommandLine.h"
 #include "llvm/Support/Debug.h"
 #include "llvm/ADT/Statistic.h"
@@ -44,7 +45,7 @@
   UnrollThreshold("unroll-threshold", cl::init(100), cl::Hidden,
                   cl::desc("The cut-off point for loop unrolling"));
 
-  class LoopUnroll : public FunctionPass {
+  class VISIBILITY_HIDDEN LoopUnroll : public FunctionPass {
     LoopInfo *LI;  // The current loop information
   public:
     virtual bool runOnFunction(Function &F);


Index: llvm/lib/Transforms/Scalar/LoopUnswitch.cpp
diff -u llvm/lib/Transforms/Scalar/LoopUnswitch.cpp:1.60 llvm/lib/Transforms/Scalar/LoopUnswitch.cpp:1.61
--- llvm/lib/Transforms/Scalar/LoopUnswitch.cpp:1.60	Fri Feb  2 18:08:31 2007
+++ llvm/lib/Transforms/Scalar/LoopUnswitch.cpp	Mon Feb  5 17:32:05 2007
@@ -39,8 +39,9 @@
 #include "llvm/Transforms/Utils/BasicBlockUtils.h"
 #include "llvm/ADT/Statistic.h"
 #include "llvm/ADT/PostOrderIterator.h"
-#include "llvm/Support/Debug.h"
 #include "llvm/Support/CommandLine.h"
+#include "llvm/Support/Compiler.h"
+#include "llvm/Support/Debug.h"
 #include <algorithm>
 #include <set>
 using namespace llvm;
@@ -56,7 +57,7 @@
   Threshold("loop-unswitch-threshold", cl::desc("Max loop size to unswitch"),
             cl::init(10), cl::Hidden);
   
-  class LoopUnswitch : public FunctionPass {
+  class VISIBILITY_HIDDEN LoopUnswitch : public FunctionPass {
     LoopInfo *LI;  // Loop information
 
     // LoopProcessWorklist - List of loops we need to process.


Index: llvm/lib/Transforms/Scalar/LowerPacked.cpp
diff -u llvm/lib/Transforms/Scalar/LowerPacked.cpp:1.15 llvm/lib/Transforms/Scalar/LowerPacked.cpp:1.16
--- llvm/lib/Transforms/Scalar/LowerPacked.cpp:1.15	Sat Dec 30 23:48:39 2006
+++ llvm/lib/Transforms/Scalar/LowerPacked.cpp	Mon Feb  5 17:32:05 2007
@@ -19,6 +19,7 @@
 #include "llvm/Function.h"
 #include "llvm/Instructions.h"
 #include "llvm/Pass.h"
+#include "llvm/Support/Compiler.h"
 #include "llvm/Support/InstVisitor.h"
 #include "llvm/Support/Streams.h"
 #include "llvm/ADT/StringExtras.h"
@@ -36,7 +37,8 @@
 ///
 /// @brief Transforms packed instructions to simpler instructions.
 ///
-class LowerPacked : public FunctionPass, public InstVisitor<LowerPacked> {
+class VISIBILITY_HIDDEN LowerPacked 
+  : public FunctionPass, public InstVisitor<LowerPacked> {
 public:
    /// @brief Lowers packed operations to scalar operations.
    /// @param F The fuction to process


Index: llvm/lib/Transforms/Scalar/Reassociate.cpp
diff -u llvm/lib/Transforms/Scalar/Reassociate.cpp:1.73 llvm/lib/Transforms/Scalar/Reassociate.cpp:1.74
--- llvm/lib/Transforms/Scalar/Reassociate.cpp:1.73	Sat Jan 20 18:29:25 2007
+++ llvm/lib/Transforms/Scalar/Reassociate.cpp	Mon Feb  5 17:32:05 2007
@@ -29,6 +29,7 @@
 #include "llvm/Pass.h"
 #include "llvm/Assembly/Writer.h"
 #include "llvm/Support/CFG.h"
+#include "llvm/Support/Compiler.h"
 #include "llvm/Support/Debug.h"
 #include "llvm/ADT/PostOrderIterator.h"
 #include "llvm/ADT/Statistic.h"
@@ -41,7 +42,7 @@
 STATISTIC(NumFactor , "Number of multiplies factored");
 
 namespace {
-  struct ValueEntry {
+  struct VISIBILITY_HIDDEN ValueEntry {
     unsigned Rank;
     Value *Op;
     ValueEntry(unsigned R, Value *O) : Rank(R), Op(O) {}
@@ -63,7 +64,7 @@
 }
   
 namespace {  
-  class Reassociate : public FunctionPass {
+  class VISIBILITY_HIDDEN Reassociate : public FunctionPass {
     std::map<BasicBlock*, unsigned> RankMap;
     std::map<Value*, unsigned> ValueRankMap;
     bool MadeChange;


Index: llvm/lib/Transforms/Scalar/Reg2Mem.cpp
diff -u llvm/lib/Transforms/Scalar/Reg2Mem.cpp:1.10 llvm/lib/Transforms/Scalar/Reg2Mem.cpp:1.11
--- llvm/lib/Transforms/Scalar/Reg2Mem.cpp:1.10	Tue Jan 30 14:08:38 2007
+++ llvm/lib/Transforms/Scalar/Reg2Mem.cpp	Mon Feb  5 17:32:05 2007
@@ -25,13 +25,14 @@
 #include "llvm/BasicBlock.h"
 #include "llvm/Instructions.h"
 #include "llvm/ADT/Statistic.h"
+#include "llvm/Support/Compiler.h"
 #include <list>
 using namespace llvm;
 
 STATISTIC(NumDemoted, "Number of registers demoted");
 
 namespace {
-  struct RegToMem : public FunctionPass {
+  struct VISIBILITY_HIDDEN RegToMem : public FunctionPass {
 
     virtual void getAnalysisUsage(AnalysisUsage &AU) const {
       AU.addRequiredID(BreakCriticalEdgesID);


Index: llvm/lib/Transforms/Scalar/SCCP.cpp
diff -u llvm/lib/Transforms/Scalar/SCCP.cpp:1.161 llvm/lib/Transforms/Scalar/SCCP.cpp:1.162
--- llvm/lib/Transforms/Scalar/SCCP.cpp:1.161	Fri Feb  2 16:36:16 2007
+++ llvm/lib/Transforms/Scalar/SCCP.cpp	Mon Feb  5 17:32:05 2007
@@ -31,6 +31,7 @@
 #include "llvm/Analysis/ConstantFolding.h"
 #include "llvm/Transforms/Utils/Local.h"
 #include "llvm/Support/CallSite.h"
+#include "llvm/Support/Compiler.h"
 #include "llvm/Support/Debug.h"
 #include "llvm/Support/InstVisitor.h"
 #include "llvm/ADT/DenseMap.h"
@@ -53,7 +54,7 @@
 /// LatticeVal class - This class represents the different lattice values that
 /// an LLVM value may occupy.  It is a simple class with value semantics.
 ///
-class LatticeVal {
+class VISIBILITY_HIDDEN LatticeVal {
   enum {
     /// undefined - This LLVM Value has no known value yet.
     undefined,
@@ -1332,7 +1333,7 @@
   /// SCCP Class - This class uses the SCCPSolver to implement a per-function
   /// Sparse Conditional Constant Propagator.
   ///
-  struct SCCP : public FunctionPass {
+  struct VISIBILITY_HIDDEN SCCP : public FunctionPass {
     // runOnFunction - Run the Sparse Conditional Constant Propagation
     // algorithm, and return true if the function was modified.
     //
@@ -1440,7 +1441,7 @@
   /// IPSCCP Class - This class implements interprocedural Sparse Conditional
   /// Constant Propagation.
   ///
-  struct IPSCCP : public ModulePass {
+  struct VISIBILITY_HIDDEN IPSCCP : public ModulePass {
     bool runOnModule(Module &M);
   };
 


Index: llvm/lib/Transforms/Scalar/SimplifyCFG.cpp
diff -u llvm/lib/Transforms/Scalar/SimplifyCFG.cpp:1.18 llvm/lib/Transforms/Scalar/SimplifyCFG.cpp:1.19
--- llvm/lib/Transforms/Scalar/SimplifyCFG.cpp:1.18	Tue Dec 19 15:40:18 2006
+++ llvm/lib/Transforms/Scalar/SimplifyCFG.cpp	Mon Feb  5 17:32:05 2007
@@ -25,6 +25,7 @@
 #include "llvm/Instructions.h"
 #include "llvm/Module.h"
 #include "llvm/Support/CFG.h"
+#include "llvm/Support/Compiler.h"
 #include "llvm/Pass.h"
 #include "llvm/ADT/Statistic.h"
 #include <set>
@@ -33,7 +34,7 @@
 STATISTIC(NumSimpl, "Number of blocks simplified");
 
 namespace {
-  struct CFGSimplifyPass : public FunctionPass {
+  struct VISIBILITY_HIDDEN CFGSimplifyPass : public FunctionPass {
     virtual bool runOnFunction(Function &F);
   };
   RegisterPass<CFGSimplifyPass> X("simplifycfg", "Simplify the CFG");


Index: llvm/lib/Transforms/Scalar/TailDuplication.cpp
diff -u llvm/lib/Transforms/Scalar/TailDuplication.cpp:1.36 llvm/lib/Transforms/Scalar/TailDuplication.cpp:1.37
--- llvm/lib/Transforms/Scalar/TailDuplication.cpp:1.36	Tue Dec 19 15:40:18 2006
+++ llvm/lib/Transforms/Scalar/TailDuplication.cpp	Mon Feb  5 17:32:05 2007
@@ -29,6 +29,7 @@
 #include "llvm/Support/CFG.h"
 #include "llvm/Transforms/Utils/Local.h"
 #include "llvm/Support/CommandLine.h"
+#include "llvm/Support/Compiler.h"
 #include "llvm/Support/Debug.h"
 #include "llvm/ADT/Statistic.h"
 using namespace llvm;
@@ -39,7 +40,7 @@
   cl::opt<unsigned>
   Threshold("taildup-threshold", cl::desc("Max block size to tail duplicate"),
             cl::init(6), cl::Hidden);
-  class TailDup : public FunctionPass {
+  class VISIBILITY_HIDDEN TailDup : public FunctionPass {
     bool runOnFunction(Function &F);
   private:
     inline bool shouldEliminateUnconditionalBranch(TerminatorInst *TI);


Index: llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp
diff -u llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp:1.27 llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp:1.28
--- llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp:1.27	Tue Dec 19 15:40:18 2006
+++ llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp	Mon Feb  5 17:32:05 2007
@@ -59,13 +59,14 @@
 #include "llvm/Pass.h"
 #include "llvm/Support/CFG.h"
 #include "llvm/ADT/Statistic.h"
+#include "llvm/Support/Compiler.h"
 using namespace llvm;
 
 STATISTIC(NumEliminated, "Number of tail calls removed");
 STATISTIC(NumAccumAdded, "Number of accumulators introduced");
 
 namespace {
-  struct TailCallElim : public FunctionPass {
+  struct VISIBILITY_HIDDEN TailCallElim : public FunctionPass {
     virtual bool runOnFunction(Function &F);
 
   private:






More information about the llvm-commits mailing list