diff options
author | Chris Lattner <sabre@nondot.org> | 2009-09-02 06:11:42 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-09-02 06:11:42 +0000 |
commit | 3e8b6631e67e01e4960a7ba4668a50c596607473 (patch) | |
tree | 3864dfc8661f3ff9716f150dc64aa671c3b47fd2 | |
parent | 52600972832cb4ae8f4c63802f3764cbfbcb203d (diff) |
eliminate VISIBILITY_HIDDEN from Transforms/Scalar. PR4861
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80766 91177308-0d34-0410-b5e6-96231b3b80d8
30 files changed, 82 insertions, 118 deletions
diff --git a/lib/Transforms/Scalar/ADCE.cpp b/lib/Transforms/Scalar/ADCE.cpp index 9c55f664eb..37f383fb51 100644 --- a/lib/Transforms/Scalar/ADCE.cpp +++ b/lib/Transforms/Scalar/ADCE.cpp @@ -21,19 +21,17 @@ #include "llvm/IntrinsicInst.h" #include "llvm/Pass.h" #include "llvm/Support/CFG.h" -#include "llvm/Support/Compiler.h" #include "llvm/Support/InstIterator.h" #include "llvm/ADT/DepthFirstIterator.h" #include "llvm/ADT/SmallPtrSet.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/Statistic.h" - using namespace llvm; STATISTIC(NumRemoved, "Number of instructions removed"); namespace { - struct VISIBILITY_HIDDEN ADCE : public FunctionPass { + struct ADCE : public FunctionPass { static char ID; // Pass identification, replacement for typeid ADCE() : FunctionPass(&ID) {} diff --git a/lib/Transforms/Scalar/BasicBlockPlacement.cpp b/lib/Transforms/Scalar/BasicBlockPlacement.cpp index 95fd67b67b..54533f5040 100644 --- a/lib/Transforms/Scalar/BasicBlockPlacement.cpp +++ b/lib/Transforms/Scalar/BasicBlockPlacement.cpp @@ -31,7 +31,6 @@ #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> @@ -40,7 +39,7 @@ using namespace llvm; STATISTIC(NumMoved, "Number of basic blocks moved"); namespace { - struct VISIBILITY_HIDDEN BlockPlacement : public FunctionPass { + struct BlockPlacement : public FunctionPass { static char ID; // Pass identification, replacement for typeid BlockPlacement() : FunctionPass(&ID) {} diff --git a/lib/Transforms/Scalar/CodeGenPrepare.cpp b/lib/Transforms/Scalar/CodeGenPrepare.cpp index 566abd8692..1d06a24a43 100644 --- a/lib/Transforms/Scalar/CodeGenPrepare.cpp +++ b/lib/Transforms/Scalar/CodeGenPrepare.cpp @@ -33,7 +33,6 @@ #include "llvm/Assembly/Writer.h" #include "llvm/Support/CallSite.h" #include "llvm/Support/CommandLine.h" -#include "llvm/Support/Compiler.h" #include "llvm/Support/Debug.h" #include "llvm/Support/GetElementPtrTypeIterator.h" #include "llvm/Support/PatternMatch.h" @@ -45,7 +44,7 @@ static cl::opt<bool> FactorCommonPreds("split-critical-paths-tweak", cl::init(false), cl::Hidden); namespace { - class VISIBILITY_HIDDEN CodeGenPrepare : public FunctionPass { + class CodeGenPrepare : public FunctionPass { /// TLI - Keep a pointer of a TargetLowering to consult for determining /// transformation profitability. const TargetLowering *TLI; diff --git a/lib/Transforms/Scalar/CondPropagate.cpp b/lib/Transforms/Scalar/CondPropagate.cpp index 562fc60321..09fc050e13 100644 --- a/lib/Transforms/Scalar/CondPropagate.cpp +++ b/lib/Transforms/Scalar/CondPropagate.cpp @@ -22,14 +22,13 @@ #include "llvm/Transforms/Utils/Local.h" #include "llvm/ADT/Statistic.h" #include "llvm/ADT/SmallVector.h" -#include "llvm/Support/Compiler.h" using namespace llvm; STATISTIC(NumBrThread, "Number of CFG edges threaded through branches"); STATISTIC(NumSwThread, "Number of CFG edges threaded through switches"); namespace { - struct VISIBILITY_HIDDEN CondProp : public FunctionPass { + struct CondProp : public FunctionPass { static char ID; // Pass identification, replacement for typeid CondProp() : FunctionPass(&ID) {} diff --git a/lib/Transforms/Scalar/ConstantProp.cpp b/lib/Transforms/Scalar/ConstantProp.cpp index 2d9d2de153..4fee327ebe 100644 --- a/lib/Transforms/Scalar/ConstantProp.cpp +++ b/lib/Transforms/Scalar/ConstantProp.cpp @@ -24,7 +24,6 @@ #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> @@ -33,7 +32,7 @@ using namespace llvm; STATISTIC(NumInstKilled, "Number of instructions killed"); namespace { - struct VISIBILITY_HIDDEN ConstantPropagation : public FunctionPass { + struct ConstantPropagation : public FunctionPass { static char ID; // Pass identification, replacement for typeid ConstantPropagation() : FunctionPass(&ID) {} diff --git a/lib/Transforms/Scalar/DCE.cpp b/lib/Transforms/Scalar/DCE.cpp index 8bb504c09c..39940c35da 100644 --- a/lib/Transforms/Scalar/DCE.cpp +++ b/lib/Transforms/Scalar/DCE.cpp @@ -21,7 +21,6 @@ #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> @@ -34,7 +33,7 @@ namespace { //===--------------------------------------------------------------------===// // DeadInstElimination pass implementation // - struct VISIBILITY_HIDDEN DeadInstElimination : public BasicBlockPass { + struct DeadInstElimination : public BasicBlockPass { static char ID; // Pass identification, replacement for typeid DeadInstElimination() : BasicBlockPass(&ID) {} virtual bool runOnBasicBlock(BasicBlock &BB) { diff --git a/lib/Transforms/Scalar/DeadStoreElimination.cpp b/lib/Transforms/Scalar/DeadStoreElimination.cpp index e28ed38edd..376a098689 100644 --- a/lib/Transforms/Scalar/DeadStoreElimination.cpp +++ b/lib/Transforms/Scalar/DeadStoreElimination.cpp @@ -29,14 +29,13 @@ #include "llvm/Analysis/MemoryDependenceAnalysis.h" #include "llvm/Target/TargetData.h" #include "llvm/Transforms/Utils/Local.h" -#include "llvm/Support/Compiler.h" using namespace llvm; STATISTIC(NumFastStores, "Number of stores deleted"); STATISTIC(NumFastOther , "Number of other instrs removed"); namespace { - struct VISIBILITY_HIDDEN DSE : public FunctionPass { + struct DSE : public FunctionPass { TargetData *TD; static char ID; // Pass identification, replacement for typeid diff --git a/lib/Transforms/Scalar/GVN.cpp b/lib/Transforms/Scalar/GVN.cpp index a667a98d19..56bc816c4f 100644 --- a/lib/Transforms/Scalar/GVN.cpp +++ b/lib/Transforms/Scalar/GVN.cpp @@ -35,7 +35,6 @@ #include "llvm/Analysis/MemoryDependenceAnalysis.h" #include "llvm/Support/CFG.h" #include "llvm/Support/CommandLine.h" -#include "llvm/Support/Compiler.h" #include "llvm/Support/Debug.h" #include "llvm/Support/ErrorHandling.h" #include "llvm/Support/raw_ostream.h" @@ -62,7 +61,7 @@ static cl::opt<bool> EnableLoadPRE("enable-load-pre", cl::init(true)); /// as an efficient mechanism to determine the expression-wise equivalence of /// two values. namespace { - struct VISIBILITY_HIDDEN Expression { + struct Expression { enum ExpressionOpcode { ADD, FADD, SUB, FSUB, MUL, FMUL, UDIV, SDIV, FDIV, UREM, SREM, FREM, SHL, LSHR, ASHR, AND, OR, XOR, ICMPEQ, @@ -119,7 +118,7 @@ namespace { } }; - class VISIBILITY_HIDDEN ValueTable { + class ValueTable { private: DenseMap<Value*, uint32_t> valueNumbering; DenseMap<Expression, uint32_t> expressionNumbering; @@ -678,7 +677,7 @@ void ValueTable::verifyRemoved(const Value *V) const { //===----------------------------------------------------------------------===// namespace { - struct VISIBILITY_HIDDEN ValueNumberScope { + struct ValueNumberScope { ValueNumberScope* parent; DenseMap<uint32_t, Value*> table; @@ -688,7 +687,7 @@ namespace { namespace { - class VISIBILITY_HIDDEN GVN : public FunctionPass { + class GVN : public FunctionPass { bool runOnFunction(Function &F); public: static char ID; // Pass identification, replacement for typeid diff --git a/lib/Transforms/Scalar/GVNPRE.cpp b/lib/Transforms/Scalar/GVNPRE.cpp index b6296f72f3..b7462f2ac2 100644 --- a/lib/Transforms/Scalar/GVNPRE.cpp +++ b/lib/Transforms/Scalar/GVNPRE.cpp @@ -37,7 +37,6 @@ #include "llvm/ADT/Statistic.h" #include "llvm/Transforms/Utils/UnifyFunctionExitNodes.h" #include "llvm/Support/CFG.h" -#include "llvm/Support/Compiler.h" #include "llvm/Support/Debug.h" #include "llvm/Support/ErrorHandling.h" #include <algorithm> @@ -133,7 +132,7 @@ struct Expression { } namespace { - class VISIBILITY_HIDDEN ValueTable { + class ValueTable { private: DenseMap<Value*, uint32_t> valueNumbering; DenseMap<Expression, uint32_t> expressionNumbering; @@ -675,8 +674,7 @@ class ValueNumberedSet { //===----------------------------------------------------------------------===// namespace { - - class VISIBILITY_HIDDEN GVNPRE : public FunctionPass { + class GVNPRE : public FunctionPass { bool runOnFunction(Function &F); public: static char ID; // Pass identification, replacement for typeid diff --git a/lib/Transforms/Scalar/IndVarSimplify.cpp b/lib/Transforms/Scalar/IndVarSimplify.cpp index ceca45220e..158b0d7f18 100644 --- a/lib/Transforms/Scalar/IndVarSimplify.cpp +++ b/lib/Transforms/Scalar/IndVarSimplify.cpp @@ -51,7 +51,6 @@ #include "llvm/Analysis/LoopInfo.h" #include "llvm/Analysis/LoopPass.h" #include "llvm/Support/CFG.h" -#include "llvm/Support/Compiler.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/Debug.h" #include "llvm/Support/raw_ostream.h" @@ -68,7 +67,7 @@ STATISTIC(NumReplaced, "Number of exit values replaced"); STATISTIC(NumLFTR , "Number of loop exit tests replaced"); namespace { - class VISIBILITY_HIDDEN IndVarSimplify : public LoopPass { + class IndVarSimplify : public LoopPass { IVUsers *IU; LoopInfo *LI; ScalarEvolution *SE; diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp index f4ae51b2a5..ce2f4520c6 100644 --- a/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/lib/Transforms/Scalar/InstructionCombining.cpp @@ -55,7 +55,6 @@ #include "llvm/Support/IRBuilder.h" #include "llvm/Support/MathExtras.h" #include "llvm/Support/PatternMatch.h" -#include "llvm/Support/Compiler.h" #include "llvm/Support/raw_ostream.h" #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/SmallVector.h" @@ -159,9 +158,8 @@ namespace { namespace { - class VISIBILITY_HIDDEN InstCombiner - : public FunctionPass, - public InstVisitor<InstCombiner, Instruction*> { + class InstCombiner : public FunctionPass, + public InstVisitor<InstCombiner, Instruction*> { TargetData *TD; bool MustPreserveLCSSA; bool MadeIRChange; diff --git a/lib/Transforms/Scalar/JumpThreading.cpp b/lib/Transforms/Scalar/JumpThreading.cpp index ff04cec281..559b8cb72a 100644 --- a/lib/Transforms/Scalar/JumpThreading.cpp +++ b/lib/Transforms/Scalar/JumpThreading.cpp @@ -26,7 +26,6 @@ #include "llvm/ADT/SmallPtrSet.h" #include "llvm/ADT/SmallSet.h" #include "llvm/Support/CommandLine.h" -#include "llvm/Support/Compiler.h" #include "llvm/Support/Debug.h" #include "llvm/Support/ValueHandle.h" #include "llvm/Support/raw_ostream.h" @@ -57,7 +56,7 @@ namespace { /// In this case, the unconditional branch at the end of the first if can be /// revectored to the false side of the second if. /// - class VISIBILITY_HIDDEN JumpThreading : public FunctionPass { + class JumpThreading : public FunctionPass { TargetData *TD; #ifdef NDEBUG SmallPtrSet<BasicBlock*, 16> LoopHeaders; diff --git a/lib/Transforms/Scalar/LICM.cpp b/lib/Transforms/Scalar/LICM.cpp index 64ca5cd1d4..15bb9c70df 100644 --- a/lib/Transforms/Scalar/LICM.cpp +++ b/lib/Transforms/Scalar/LICM.cpp @@ -46,7 +46,6 @@ #include "llvm/Analysis/ScalarEvolution.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/raw_ostream.h" #include "llvm/Support/Debug.h" @@ -74,7 +73,7 @@ EnableLICMConstantMotion("enable-licm-constant-variables", cl::Hidden, "global variables")); namespace { - struct VISIBILITY_HIDDEN LICM : public LoopPass { + struct LICM : public LoopPass { static char ID; // Pass identification, replacement for typeid LICM() : LoopPass(&ID) {} diff --git a/lib/Transforms/Scalar/LoopDeletion.cpp b/lib/Transforms/Scalar/LoopDeletion.cpp index 525d03fea6..5f93756a05 100644 --- a/lib/Transforms/Scalar/LoopDeletion.cpp +++ b/lib/Transforms/Scalar/LoopDeletion.cpp @@ -15,19 +15,17 @@ //===----------------------------------------------------------------------===// #define DEBUG_TYPE "loop-delete" - #include "llvm/Transforms/Scalar.h" #include "llvm/Analysis/LoopPass.h" #include "llvm/Analysis/ScalarEvolution.h" #include "llvm/ADT/Statistic.h" #include "llvm/ADT/SmallVector.h" - using namespace llvm; STATISTIC(NumDeleted, "Number of loops deleted"); namespace { - class VISIBILITY_HIDDEN LoopDeletion : public LoopPass { + class LoopDeletion : public LoopPass { public: static char ID; // Pass ID, replacement for typeid LoopDeletion() : LoopPass(&ID) {} diff --git a/lib/Transforms/Scalar/LoopIndexSplit.cpp b/lib/Transforms/Scalar/LoopIndexSplit.cpp index 259427e99b..5f9d3703da 100644 --- a/lib/Transforms/Scalar/LoopIndexSplit.cpp +++ b/lib/Transforms/Scalar/LoopIndexSplit.cpp @@ -51,7 +51,6 @@ //===----------------------------------------------------------------------===// #define DEBUG_TYPE "loop-index-split" - #include "llvm/Transforms/Scalar.h" #include "llvm/IntrinsicInst.h" #include "llvm/LLVMContext.h" @@ -61,7 +60,6 @@ #include "llvm/Transforms/Utils/BasicBlockUtils.h" #include "llvm/Transforms/Utils/Cloning.h" #include "llvm/Transforms/Utils/Local.h" -#include "llvm/Support/Compiler.h" #include "llvm/ADT/DepthFirstIterator.h" #include "llvm/ADT/Statistic.h" @@ -73,8 +71,7 @@ STATISTIC(NumRestrictBounds, "Number of loop iteration space restricted"); namespace { - class VISIBILITY_HIDDEN LoopIndexSplit : public LoopPass { - + class LoopIndexSplit : public LoopPass { public: static char ID; // Pass ID, replacement for typeid LoopIndexSplit() : LoopPass(&ID) {} diff --git a/lib/Transforms/Scalar/LoopRotation.cpp b/lib/Transforms/Scalar/LoopRotation.cpp index 687304a06d..4b10d1006e 100644 --- a/lib/Transforms/Scalar/LoopRotation.cpp +++ b/lib/Transforms/Scalar/LoopRotation.cpp @@ -32,7 +32,7 @@ using namespace llvm; STATISTIC(NumRotated, "Number of loops rotated"); namespace { - class VISIBILITY_HIDDEN RenameData { + class RenameData { public: RenameData(Instruction *O, Value *P, Instruction *H) : Original(O), PreHeader(P), Header(H) { } @@ -42,8 +42,7 @@ namespace { Instruction *Header; // New header replacement }; - class VISIBILITY_HIDDEN LoopRotate : public LoopPass { - + class LoopRotate : public LoopPass { public: static char ID; // Pass ID, replacement for typeid LoopRotate() : LoopPass(&ID) {} diff --git a/lib/Transforms/Scalar/LoopStrengthReduce.cpp b/lib/Transforms/Scalar/LoopStrengthReduce.cpp index ed32f50cc6..0bf62ec906 100644 --- a/lib/Transforms/Scalar/LoopStrengthReduce.cpp +++ b/lib/Transforms/Scalar/LoopStrengthReduce.cpp @@ -38,7 +38,6 @@ #include "llvm/ADT/Statistic.h" #include "llvm/Support/CFG.h" #include "llvm/Support/Debug.h" -#include "llvm/Support/Compiler.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/ValueHandle.h" #include "llvm/Support/raw_ostream.h" @@ -65,7 +64,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 VISIBILITY_HIDDEN IVExpr { + struct IVExpr { const SCEV *Stride; const SCEV *Base; PHINode *PHI; @@ -76,7 +75,7 @@ namespace { /// IVsOfOneStride - This structure keeps track of all IV expression inserted /// during StrengthReduceStridedIVUsers for a particular stride of the IV. - struct VISIBILITY_HIDDEN IVsOfOneStride { + struct IVsOfOneStride { std::vector<IVExpr> IVs; void addIV(const SCEV *const Stride, const SCEV *const Base, PHINode *PHI) { @@ -84,7 +83,7 @@ namespace { } }; - class VISIBILITY_HIDDEN LoopStrengthReduce : public LoopPass { + class LoopStrengthReduce : public LoopPass { IVUsers *IU; LoopInfo *LI; DominatorTree *DT; diff --git a/lib/Transforms/Scalar/LoopUnroll.cpp b/lib/Transforms/Scalar/LoopUnroll.cpp index c5a213fa55..837ec59dbb 100644 --- a/lib/Transforms/Scalar/LoopUnroll.cpp +++ b/lib/Transforms/Scalar/LoopUnroll.cpp @@ -17,7 +17,6 @@ #include "llvm/Transforms/Scalar.h" #include "llvm/Analysis/LoopInfo.h" #include "llvm/Analysis/LoopPass.h" -#include "llvm/Support/Compiler.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/Debug.h" #include "llvm/Support/raw_ostream.h" @@ -40,7 +39,7 @@ UnrollAllowPartial("unroll-allow-partial", cl::init(false), cl::Hidden, "-unroll-threshold loop size is reached.")); namespace { - class VISIBILITY_HIDDEN LoopUnroll : public LoopPass { + class LoopUnroll : public LoopPass { public: static char ID; // Pass ID, replacement for typeid LoopUnroll() : LoopPass(&ID) {} diff --git a/lib/Transforms/Scalar/LoopUnswitch.cpp b/lib/Transforms/Scalar/LoopUnswitch.cpp index 06ee95cd32..8e7c91a3f2 100644 --- a/lib/Transforms/Scalar/LoopUnswitch.cpp +++ b/lib/Transforms/Scalar/LoopUnswitch.cpp @@ -44,7 +44,6 @@ #include "llvm/ADT/SmallPtrSet.h" #include "llvm/ADT/STLExtras.h" #include "llvm/Support/CommandLine.h" -#include "llvm/Support/Compiler.h" #include "llvm/Support/Debug.h" #include "llvm/Support/raw_ostream.h" #include <algorithm> @@ -62,7 +61,7 @@ Threshold("loop-unswitch-threshold", cl::desc("Max loop size to unswitch"), cl::init(10), cl::Hidden); namespace { - class VISIBILITY_HIDDEN LoopUnswitch : public LoopPass { + class LoopUnswitch : public LoopPass { LoopInfo *LI; // Loop information LPPassManager *LPM; diff --git a/lib/Transforms/Scalar/MemCpyOptimizer.cpp b/lib/Transforms/Scalar/MemCpyOptimizer.cpp index a158f0a8f5..fd74a03845 100644 --- a/lib/Transforms/Scalar/MemCpyOptimizer.cpp +++ b/lib/Transforms/Scalar/MemCpyOptimizer.cpp @@ -296,8 +296,7 @@ void MemsetRanges::addStore(int64_t Start, StoreInst *SI) { //===----------------------------------------------------------------------===// namespace { - - class VISIBILITY_HIDDEN MemCpyOpt : public FunctionPass { + class MemCpyOpt : public FunctionPass { bool runOnFunction(Function &F); public: static char ID; // Pass identification, replacement for typeid diff --git a/lib/Transforms/Scalar/PredicateSimplifier.cpp b/lib/Transforms/Scalar/PredicateSimplifier.cpp index 263c60651f..b8ac1828db 100644 --- a/lib/Transforms/Scalar/PredicateSimplifier.cpp +++ b/lib/Transforms/Scalar/PredicateSimplifier.cpp @@ -93,7 +93,6 @@ #include "llvm/Analysis/Dominators.h" #include "llvm/Assembly/Writer.h" #include "llvm/Support/CFG.h" -#include "llvm/Support/Compiler.h" #include "llvm/Support/ConstantRange.h" #include "llvm/Support/Debug.h" #include "llvm/Support/InstVisitor.h" @@ -377,12 +376,12 @@ namespace { } /// ValueNumbering stores the scope-specific value numbers for a given Value. - class VISIBILITY_HIDDEN ValueNumbering { + class ValueNumbering { /// VNPair is a tuple of {Value, index number, DomTreeDFS::Node}. It /// includes the comparison operators necessary to allow you to store it /// in a sorted vector. - class VISIBILITY_HIDDEN VNPair { + class VNPair { public: Value *V; unsigned index; @@ -592,7 +591,7 @@ namespace { /// /// The InequalityGraph class may invalidate Node*s after any mutator call. /// @brief The InequalityGraph stores the relationships between values. - class VISIBILITY_HIDDEN InequalityGraph { + class InequalityGraph { ValueNumbering &VN; DomTreeDFS::Node *TreeRoot; @@ -608,7 +607,7 @@ namespace { /// and contains a pointer to the other end. The edge contains a lattice /// value specifying the relationship and an DomTreeDFS::Node specifying /// the root in the dominator tree to which this edge applies. - class VISIBILITY_HIDDEN Edge { + class Edge { public: Edge(unsigned T, LatticeVal V, DomTreeDFS::Node *ST) : To(T), LV(V), Subtree(ST) {} @@ -639,7 +638,7 @@ namespace { /// for the node, as well as the relationships with the neighbours. /// /// @brief A single node in the InequalityGraph. - class VISIBILITY_HIDDEN Node { + class Node { friend class InequalityGraph; typedef SmallVector<Edge, 4> RelationsType; @@ -904,12 +903,12 @@ namespace { /// ValueRanges tracks the known integer ranges and anti-ranges of the nodes /// in the InequalityGraph. - class VISIBILITY_HIDDEN ValueRanges { + class ValueRanges { ValueNumbering &VN; TargetData *TD; LLVMContext *Context; - class VISIBILITY_HIDDEN ScopedRange { + class ScopedRange { typedef std::vector<std::pair<DomTreeDFS::Node *, ConstantRange> > RangeListType; RangeListType RangeList; @@ -1270,7 +1269,7 @@ namespace { /// another discovered to be unreachable. This is used to cull the graph when /// analyzing instructions, and to mark blocks with the "unreachable" /// terminator instruction after the function has executed. - class VISIBILITY_HIDDEN UnreachableBlocks { + class UnreachableBlocks { private: std::vector<BasicBlock *> DeadBlocks; @@ -1324,7 +1323,7 @@ namespace { /// variables, and forwards changes along to the InequalityGraph. It /// also maintains the correct choice for "canonical" in the IG. /// @brief VRPSolver calculates inferences from a new relationship. - class VISIBILITY_HIDDEN VRPSolver { + class VRPSolver { private: friend class ValueRanges; @@ -2266,7 +2265,7 @@ namespace { /// one equivalent variable with another. It also tracks what /// can't be equal and will solve setcc instructions when possible. /// @brief Root of the predicate simplifier optimization. - class VISIBILITY_HIDDEN PredicateSimplifier : public FunctionPass { + class PredicateSimplifier : public FunctionPass { DomTreeDFS *DTDFS; bool modified; ValueNumbering *VN; @@ -2295,7 +2294,7 @@ namespace { /// PredicateSimplifier::proceedToSuccessor(s) interface to enter the /// basic block. /// @brief Performs abstract execution of the program. - class VISIBILITY_HIDDEN Forwards : public InstVisitor<Forwards> { + class Forwards : public InstVisitor<Forwards> { friend class InstVisitor<Forwards>; PredicateSimplifier *PS; DomTreeDFS::Node *DTNode; diff --git a/lib/Transforms/Scalar/Reassociate.cpp b/lib/Transforms/Scalar/Reassociate.cpp index 9ef4ea8ffe..e6ffac251b 100644 --- a/lib/Transforms/Scalar/Reassociate.cpp +++ b/lib/Transforms/Scalar/Reassociate.cpp @@ -31,7 +31,6 @@ #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/Support/ValueHandle.h" #include "llvm/Support/raw_ostream.h" @@ -47,7 +46,7 @@ STATISTIC(NumAnnihil, "Number of expr tree annihilated"); STATISTIC(NumFactor , "Number of multiplies factored"); namespace { - struct VISIBILITY_HIDDEN ValueEntry { + struct ValueEntry { unsigned Rank; Value *Op; ValueEntry(unsigned R, Value *O) : Rank(R), Op(O) {} @@ -72,7 +71,7 @@ static void PrintOps(Instruction *I, const std::vector<ValueEntry> &Ops) { #endif namespace { - class VISIBILITY_HIDDEN Reassociate : public FunctionPass { + class Reassociate : public FunctionPass { std::map<BasicBlock*, unsigned> RankMap; std::map<AssertingVH<>, unsigned> ValueRankMap; bool MadeChange; diff --git a/lib/Transforms/Scalar/Reg2Mem.cpp b/lib/Transforms/Scalar/Reg2Mem.cpp index b0db3177d8..23d6ff5005 100644 --- a/lib/Transforms/Scalar/Reg2Mem.cpp +++ b/lib/Transforms/Scalar/Reg2Mem.cpp @@ -26,7 +26,6 @@ #include "llvm/BasicBlock.h" #include "llvm/Instructions.h" #include "llvm/ADT/Statistic.h" -#include "llvm/Support/Compiler.h" #include "llvm/Support/CFG.h" #include <list> using namespace llvm; @@ -35,7 +34,7 @@ STATISTIC(NumRegsDemoted, "Number of registers demoted"); STATISTIC(NumPhisDemoted, "Number of phi-nodes demoted"); namespace { - struct VISIBILITY_HIDDEN RegToMem : public FunctionPass { + struct RegToMem : public FunctionPass { static char ID; // Pass identification, replacement for typeid RegToMem() : FunctionPass(&ID) {} diff --git a/lib/Transforms/Scalar/SCCP.cpp b/lib/Transforms/Scalar/SCCP.cpp index 155e91ec7b..e1f0ba535c 100644 --- a/lib/Transforms/Scalar/SCCP.cpp +++ b/lib/Transforms/Scalar/SCCP.cpp @@ -33,7 +33,6 @@ #include "llvm/Analysis/ValueTracking.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/ErrorHandling.h" #include "llvm/Support/InstVisitor.h" @@ -60,7 +59,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 VISIBILITY_HIDDEN LatticeVal { +class LatticeVal { enum { /// undefined - This LLVM Value has no known value yet. undefined, @@ -1506,7 +1505,7 @@ namespace { /// SCCP Class - This class uses the SCCPSolver to implement a per-function /// Sparse Conditional Constant Propagator. /// - struct VISIBILITY_HIDDEN SCCP : public FunctionPass { + struct SCCP : public FunctionPass { static char ID; // Pass identification, replacement for typeid SCCP() : FunctionPass(&ID) {} @@ -1621,7 +1620,7 @@ namespace { /// IPSCCP Class - This class implements interprocedural Sparse Conditional /// Constant Propagation. /// - struct VISIBILITY_HIDDEN IPSCCP : public ModulePass { + struct IPSCCP : public ModulePass { static char ID; IPSCCP() : ModulePass(&ID) {} bool runOnModule(Module &M); diff --git a/lib/Transforms/Scalar/ScalarReplAggregates.cpp b/lib/Transforms/Scalar/ScalarReplAggregates.cpp index 4812370c9b..a7b033ffb9 100644 --- a/lib/Transforms/Scalar/ScalarReplAggregates.cpp +++ b/ |