summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2007-02-05 23:32:05 +0000
committerReid Spencer <rspencer@reidspencer.com>2007-02-05 23:32:05 +0000
commit557ab15e71dccf36ac3a42d5874cd9ec292ccc3f (patch)
tree9f50ab45c933f176cf93ee992e75aaaf03459cc5 /llvm/lib/Transforms/Scalar
parent52da61fb5cb061c702bc9c45e73dc22ab1489c8e (diff)
downloadbcm5719-llvm-557ab15e71dccf36ac3a42d5874cd9ec292ccc3f.tar.gz
bcm5719-llvm-557ab15e71dccf36ac3a42d5874cd9ec292ccc3f.zip
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. llvm-svn: 33939
Diffstat (limited to 'llvm/lib/Transforms/Scalar')
-rw-r--r--llvm/lib/Transforms/Scalar/ADCE.cpp3
-rw-r--r--llvm/lib/Transforms/Scalar/BasicBlockPlacement.cpp3
-rw-r--r--llvm/lib/Transforms/Scalar/CondPropagate.cpp3
-rw-r--r--llvm/lib/Transforms/Scalar/ConstantProp.cpp3
-rw-r--r--llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp11
-rw-r--r--llvm/lib/Transforms/Scalar/DCE.cpp3
-rw-r--r--llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp3
-rw-r--r--llvm/lib/Transforms/Scalar/GCSE.cpp3
-rw-r--r--llvm/lib/Transforms/Scalar/IndVarSimplify.cpp3
-rw-r--r--llvm/lib/Transforms/Scalar/LICM.cpp5
-rw-r--r--llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp8
-rw-r--r--llvm/lib/Transforms/Scalar/LoopUnroll.cpp3
-rw-r--r--llvm/lib/Transforms/Scalar/LoopUnswitch.cpp5
-rw-r--r--llvm/lib/Transforms/Scalar/LowerPacked.cpp4
-rw-r--r--llvm/lib/Transforms/Scalar/Reassociate.cpp5
-rw-r--r--llvm/lib/Transforms/Scalar/Reg2Mem.cpp3
-rw-r--r--llvm/lib/Transforms/Scalar/SCCP.cpp7
-rw-r--r--llvm/lib/Transforms/Scalar/SimplifyCFG.cpp3
-rw-r--r--llvm/lib/Transforms/Scalar/TailDuplication.cpp3
-rw-r--r--llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp3
20 files changed, 52 insertions, 32 deletions
diff --git a/llvm/lib/Transforms/Scalar/ADCE.cpp b/llvm/lib/Transforms/Scalar/ADCE.cpp
index 825c7815362..63612768f4d 100644
--- a/llvm/lib/Transforms/Scalar/ADCE.cpp
+++ b/llvm/lib/Transforms/Scalar/ADCE.cpp
@@ -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 @@ namespace {
// 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
diff --git a/llvm/lib/Transforms/Scalar/BasicBlockPlacement.cpp b/llvm/lib/Transforms/Scalar/BasicBlockPlacement.cpp
index 020b2b2c52e..14de1f1f475 100644
--- a/llvm/lib/Transforms/Scalar/BasicBlockPlacement.cpp
+++ b/llvm/lib/Transforms/Scalar/BasicBlockPlacement.cpp
@@ -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 @@ using namespace llvm;
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 {
diff --git a/llvm/lib/Transforms/Scalar/CondPropagate.cpp b/llvm/lib/Transforms/Scalar/CondPropagate.cpp
index 55dccd78408..4c3a9754963 100644
--- a/llvm/lib/Transforms/Scalar/CondPropagate.cpp
+++ b/llvm/lib/Transforms/Scalar/CondPropagate.cpp
@@ -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(NumBrThread, "Number of CFG edges threaded through branches");
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 {
diff --git a/llvm/lib/Transforms/Scalar/ConstantProp.cpp b/llvm/lib/Transforms/Scalar/ConstantProp.cpp
index da59ad42baf..226d1deb41b 100644
--- a/llvm/lib/Transforms/Scalar/ConstantProp.cpp
+++ b/llvm/lib/Transforms/Scalar/ConstantProp.cpp
@@ -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 @@ using namespace llvm;
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 {
diff --git a/llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp b/llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp
index 5172daa9c4e..fe122c456c4 100644
--- a/llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp
+++ b/llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp
@@ -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 @@ STATISTIC(BranchRevectors, "Number of branches revectored");
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 @@ namespace {
// 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 @@ namespace {
// 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 @@ namespace {
};
/// 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;
diff --git a/llvm/lib/Transforms/Scalar/DCE.cpp b/llvm/lib/Transforms/Scalar/DCE.cpp
index eb5721583ca..998d87cf1b6 100644
--- a/llvm/lib/Transforms/Scalar/DCE.cpp
+++ b/llvm/lib/Transforms/Scalar/DCE.cpp
@@ -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 @@ namespace {
//===--------------------------------------------------------------------===//
// 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(); )
diff --git a/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp b/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
index 39f2506c163..9ebb9b4974b 100644
--- a/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
+++ b/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
@@ -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;
diff --git a/llvm/lib/Transforms/Scalar/GCSE.cpp b/llvm/lib/Transforms/Scalar/GCSE.cpp
index 7fef306985b..5ef6d976d77 100644
--- a/llvm/lib/Transforms/Scalar/GCSE.cpp
+++ b/llvm/lib/Transforms/Scalar/GCSE.cpp
@@ -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(NumNonInsts , "Number of instructions removed due "
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:
diff --git a/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp b/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp
index 30435df8605..155e7ccb397 100644
--- a/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp
+++ b/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp
@@ -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(NumReplaced, "Number of exit values replaced");
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;
diff --git a/llvm/lib/Transforms/Scalar/LICM.cpp b/llvm/lib/Transforms/Scalar/LICM.cpp
index a07ea268900..3a7adef56eb 100644
--- a/llvm/lib/Transforms/Scalar/LICM.cpp
+++ b/llvm/lib/Transforms/Scalar/LICM.cpp
@@ -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 @@ namespace {
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
diff --git a/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp b/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
index 798fb81190f..d841642de05 100644
--- a/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
+++ b/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
@@ -46,7 +46,7 @@ namespace {
/// 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 @@ namespace {
/// 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 @@ namespace {
/// 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 @@ namespace {
/// 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,
diff --git a/llvm/lib/Transforms/Scalar/LoopUnroll.cpp b/llvm/lib/Transforms/Scalar/LoopUnroll.cpp
index c6d88538310..d1770da8fce 100644
--- a/llvm/lib/Transforms/Scalar/LoopUnroll.cpp
+++ b/llvm/lib/Transforms/Scalar/LoopUnroll.cpp
@@ -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 @@ namespace {
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);
diff --git a/llvm/lib/Transforms/Scalar/LoopUnswitch.cpp b/llvm/lib/Transforms/Scalar/LoopUnswitch.cpp
index 9492cefb6a1..8a4ac01fbe4 100644
--- a/llvm/lib/Transforms/Scalar/LoopUnswitch.cpp
+++ b/llvm/lib/Transforms/Scalar/LoopUnswitch.cpp
@@ -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 @@ namespace {
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.
diff --git a/llvm/lib/Transforms/Scalar/LowerPacked.cpp b/llvm/lib/Transforms/Scalar/LowerPacked.cpp
index c2ec981c190..116cccad62a 100644
--- a/llvm/lib/Transforms/Scalar/LowerPacked.cpp
+++ b/llvm/lib/Transforms/Scalar/LowerPacked.cpp
@@ -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 @@ namespace {
///
/// @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
diff --git a/llvm/lib/Transforms/Scalar/Reassociate.cpp b/llvm/lib/Transforms/Scalar/Reassociate.cpp
index 4fcbf35f567..40f2ece255e 100644
--- a/llvm/lib/Transforms/Scalar/Reassociate.cpp
+++ b/llvm/lib/Transforms/Scalar/Reassociate.cpp
@@ -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(NumAnnihil, "Number of expr tree annihilated");
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 @@ static void PrintOps(Instruction *I, const std::vector<ValueEntry> &Ops) {
}
namespace {
- class Reassociate : public FunctionPass {
+ class VISIBILITY_HIDDEN Reassociate : public FunctionPass {
std::map<BasicBlock*, unsigned> RankMap;
std::map<Value*, unsigned> ValueRankMap;
bool MadeChange;
diff --git a/llvm/lib/Transforms/Scalar/Reg2Mem.cpp b/llvm/lib/Transforms/Scalar/Reg2Mem.cpp
index a5faa422e46..e1eab65bd40 100644
--- a/llvm/lib/Transforms/Scalar/Reg2Mem.cpp
+++ b/llvm/lib/Transforms/Scalar/Reg2Mem.cpp
@@ -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);
diff --git a/llvm/lib/Transforms/Scalar/SCCP.cpp b/llvm/lib/Transforms/Scalar/SCCP.cpp
index 411d9023975..78377e74271 100644
--- a/llvm/lib/Transforms/Scalar/SCCP.cpp
+++ b/llvm/lib/Transforms/Scalar/SCCP.cpp
@@ -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 @@ namespace {
/// 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 @@ namespace {
/// 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 @@ namespace {
/// IPSCCP Class - This class implements interprocedural Sparse Conditional
/// Constant Propagation.
///
- struct IPSCCP : public ModulePass {
+ struct VISIBILITY_HIDDEN IPSCCP : public ModulePass {
bool runOnModule(Module &M);
};
diff --git a/llvm/lib/Transforms/Scalar/SimplifyCFG.cpp b/llvm/lib/Transforms/Scalar/SimplifyCFG.cpp
index f363a3a5c58..97ea9f4ce55 100644
--- a/llvm/lib/Transforms/Scalar/SimplifyCFG.cpp
+++ b/llvm/lib/Transforms/Scalar/SimplifyCFG.cpp
@@ -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 @@ using namespace llvm;
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");
diff --git a/llvm/lib/Transforms/Scalar/TailDuplication.cpp b/llvm/lib/Transforms/Scalar/TailDuplication.cpp
index 97e8b186e52..398da0aa9b6 100644
--- a/llvm/lib/Transforms/Scalar/TailDuplication.cpp
+++ b/llvm/lib/Transforms/Scalar/TailDuplication.cpp
@@ -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 @@ namespace {
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);
diff --git a/llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp b/llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp
index daa6200871a..d2ec688b749 100644
--- a/llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp
+++ b/llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp
@@ -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:
OpenPOWER on IntegriCloud