diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2007-02-05 23:32:05 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2007-02-05 23:32:05 +0000 |
commit | 9133fe28954d498fc4de13064c7d65bd811de02c (patch) | |
tree | 0117d56610e0b7ff16138107397c990d3b8bb580 /lib/Transforms/Scalar | |
parent | a0d1548d0db3bb2893cd04f4d92c066c7d1cdf5f (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33939 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar')
-rw-r--r-- | lib/Transforms/Scalar/ADCE.cpp | 3 | ||||
-rw-r--r-- | lib/Transforms/Scalar/BasicBlockPlacement.cpp | 3 | ||||
-rw-r--r-- | lib/Transforms/Scalar/CondPropagate.cpp | 3 | ||||
-rw-r--r-- | lib/Transforms/Scalar/ConstantProp.cpp | 3 | ||||
-rw-r--r-- | lib/Transforms/Scalar/CorrelatedExprs.cpp | 11 | ||||
-rw-r--r-- | lib/Transforms/Scalar/DCE.cpp | 3 | ||||
-rw-r--r-- | lib/Transforms/Scalar/DeadStoreElimination.cpp | 3 | ||||
-rw-r--r-- | lib/Transforms/Scalar/GCSE.cpp | 3 | ||||
-rw-r--r-- | lib/Transforms/Scalar/IndVarSimplify.cpp | 3 | ||||
-rw-r--r-- | lib/Transforms/Scalar/LICM.cpp | 5 | ||||
-rw-r--r-- | lib/Transforms/Scalar/LoopStrengthReduce.cpp | 8 | ||||
-rw-r--r-- | lib/Transforms/Scalar/LoopUnroll.cpp | 3 | ||||
-rw-r--r-- | lib/Transforms/Scalar/LoopUnswitch.cpp | 5 | ||||
-rw-r--r-- | lib/Transforms/Scalar/LowerPacked.cpp | 4 | ||||
-rw-r--r-- | lib/Transforms/Scalar/Reassociate.cpp | 5 | ||||
-rw-r--r-- | lib/Transforms/Scalar/Reg2Mem.cpp | 3 | ||||
-rw-r--r-- | lib/Transforms/Scalar/SCCP.cpp | 7 | ||||
-rw-r--r-- | lib/Transforms/Scalar/SimplifyCFG.cpp | 3 | ||||
-rw-r--r-- | lib/Transforms/Scalar/TailDuplication.cpp | 3 | ||||
-rw-r--r-- | lib/Transforms/Scalar/TailRecursionElimination.cpp | 3 |
20 files changed, 52 insertions, 32 deletions
diff --git a/lib/Transforms/Scalar/ADCE.cpp b/lib/Transforms/Scalar/ADCE.cpp index 825c781536..63612768f4 100644 --- a/lib/Transforms/Scalar/ADCE.cpp +++ b/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/lib/Transforms/Scalar/BasicBlockPlacement.cpp b/lib/Transforms/Scalar/BasicBlockPlacement.cpp index 020b2b2c52..14de1f1f47 100644 --- a/lib/Transforms/Scalar/BasicBlockPlacement.cpp +++ b/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/lib/Transforms/Scalar/CondPropagate.cpp b/lib/Transforms/Scalar/CondPropagate.cpp index 55dccd7840..4c3a975496 100644 --- a/lib/Transforms/Scalar/CondPropagate.cpp +++ b/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/lib/Transforms/Scalar/ConstantProp.cpp b/lib/Transforms/Scalar/ConstantProp.cpp index da59ad42ba..226d1deb41 100644 --- a/lib/Transforms/Scalar/ConstantProp.cpp +++ b/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/lib/Transforms/Scalar/CorrelatedExprs.cpp b/lib/Transforms/Scalar/CorrelatedExprs.cpp index 5172daa9c4..fe122c456c 100644 --- a/lib/Transforms/Scalar/CorrelatedExprs.cpp +++ b/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/lib/Transforms/Scalar/DCE.cpp b/lib/Transforms/Scalar/DCE.cpp index eb5721583c..998d87cf1b 100644 --- a/lib/Transforms/Scalar/DCE.cpp +++ b/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/lib/Transforms/Scalar/DeadStoreElimination.cpp b/lib/Transforms/Scalar/DeadStoreElimination.cpp index 39f2506c16..9ebb9b4974 100644 --- a/lib/Transforms/Scalar/DeadStoreElimination.cpp +++ b/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/lib/Transforms/Scalar/GCSE.cpp b/lib/Transforms/Scalar/GCSE.cpp index 7fef306985..5ef6d976d7 100644 --- a/lib/Transforms/Scalar/GCSE.cpp +++ b/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/lib/Transforms/Scalar/IndVarSimplify.cpp b/lib/Transforms/Scalar/IndVarSimplify.cpp index 30435df860..155e7ccb39 100644 --- a/lib/Transforms/Scalar/IndVarSimplify.cpp +++ b/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/lib/Transforms/Scalar/LICM.cpp b/lib/Transforms/Scalar/LICM.cpp index a07ea26890..3a7adef56e 100644 --- a/lib/Transforms/Scalar/LICM.cpp +++ b/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/lib/Transforms/Scalar/LoopStrengthReduce.cpp b/lib/Transforms/Scalar/LoopStrengthReduce.cpp index 798fb81190..d841642de0 100644 --- a/lib/Transforms/Scalar/LoopStrengthReduce.cpp +++ b/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/lib/Transforms/Scalar/LoopUnroll.cpp b/lib/Transforms/Scalar/LoopUnroll.cpp index c6d8853831..d1770da8fc 100644 --- a/lib/Transforms/Scalar/LoopUnroll.cpp +++ b/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/lib/Transforms/Scalar/LoopUnswitch.cpp b/lib/Transforms/Scalar/LoopUnswitch.cpp index 9492cefb6a..8a4ac01fbe 100644 --- a/lib/Transforms/Scalar/LoopUnswitch.cpp +++ b/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/lib/Transforms/Scalar/LowerPacked.cpp b/lib/Transforms/Scalar/LowerPacked.cpp index c2ec981c19..116cccad62 100644 --- a/lib/Transforms/Scalar/LowerPacked.cpp +++ b/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/lib/Transforms/Scalar/Reassociate.cpp b/lib/Transforms/Scalar/Reassociate.cpp index 4fcbf35f56..40f2ece255 100644 --- a/lib/Transforms/Scalar/Reassociate.cpp +++ b/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/lib/Transforms/Scalar/Reg2Mem.cpp b/lib/Transforms/Scalar/Reg2Mem.cpp index a5faa422e4..e1eab65bd4 100644 --- a/lib/Transforms/Scalar/Reg2Mem.cpp +++ b/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/lib/Transforms/Scalar/SCCP.cpp b/lib/Transforms/Scalar/SCCP.cpp index 411d902397..78377e7427 100644 --- a/lib/Transforms/Scalar/SCCP.cpp +++ b/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/lib/Transforms/Scalar/SimplifyCFG.cpp b/lib/Transforms/Scalar/SimplifyCFG.cpp index f363a3a5c5..97ea9f4ce5 100644 --- a/lib/Transforms/Scalar/SimplifyCFG.cpp +++ b/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/lib/Transforms/Scalar/TailDuplication.cpp b/lib/Transforms/Scalar/TailDuplication.cpp index 97e8b186e5..398da0aa9b 100644 --- a/lib/Transforms/Scalar/TailDuplication.cpp +++ b/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/lib/Transforms/Scalar/TailRecursionElimination.cpp b/lib/Transforms/Scalar/TailRecursionElimination.cpp index daa6200871..d2ec688b74 100644 --- a/lib/Transforms/Scalar/TailRecursionElimination.cpp +++ b/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: |