diff --git a/lib/Transforms/Scalar/ADCE.cpp b/lib/Transforms/Scalar/ADCE.cpp index 9c55f664ebb..37f383fb512 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 95fd67b67b5..54533f50405 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 @@ -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 566abd86924..1d06a24a430 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 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 562fc603210..09fc050e13c 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 2d9d2de1534..4fee327ebec 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 @@ -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 8bb504c09c6..39940c35da5 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 @@ -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 e28ed38edda..376a098689d 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 a667a98d194..56bc816c4f4 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 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 valueNumbering; DenseMap expressionNumbering; @@ -678,7 +677,7 @@ void ValueTable::verifyRemoved(const Value *V) const { //===----------------------------------------------------------------------===// namespace { - struct VISIBILITY_HIDDEN ValueNumberScope { + struct ValueNumberScope { ValueNumberScope* parent; DenseMap 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 b6296f72f3f..b7462f2ac21 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 @@ -133,7 +132,7 @@ struct Expression { } namespace { - class VISIBILITY_HIDDEN ValueTable { + class ValueTable { private: DenseMap valueNumbering; DenseMap 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 ceca45220e9..158b0d7f184 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 f4ae51b2a52..ce2f4520c6a 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 { + class InstCombiner : public FunctionPass, + public InstVisitor { TargetData *TD; bool MustPreserveLCSSA; bool MadeIRChange; diff --git a/lib/Transforms/Scalar/JumpThreading.cpp b/lib/Transforms/Scalar/JumpThreading.cpp index ff04cec2818..559b8cb72a9 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 LoopHeaders; diff --git a/lib/Transforms/Scalar/LICM.cpp b/lib/Transforms/Scalar/LICM.cpp index 64ca5cd1d4b..15bb9c70dfe 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 525d03fea6f..5f93756a05c 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 259427e99bc..5f9d3703da9 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 687304a06d3..4b10d1006e7 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 ed32f50cc66..0bf62ec9064 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 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 c5a213fa554..837ec59dbbc 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 06ee95cd323..8e7c91a3f28 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 @@ -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 a158f0a8f5b..fd74a038453 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 263c60651fd..b8ac1828db8 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 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 > 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 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 { + class Forwards : public InstVisitor { friend class InstVisitor; PredicateSimplifier *PS; DomTreeDFS::Node *DTNode; diff --git a/lib/Transforms/Scalar/Reassociate.cpp b/lib/Transforms/Scalar/Reassociate.cpp index 9ef4ea8ffef..e6ffac251b7 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 &Ops) { #endif namespace { - class VISIBILITY_HIDDEN Reassociate : public FunctionPass { + class Reassociate : public FunctionPass { std::map RankMap; std::map, unsigned> ValueRankMap; bool MadeChange; diff --git a/lib/Transforms/Scalar/Reg2Mem.cpp b/lib/Transforms/Scalar/Reg2Mem.cpp index b0db3177d8f..23d6ff50055 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 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 155e91ec7b4..e1f0ba535cd 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 4812370c9bb..a7b033ffb9d 100644 --- a/lib/Transforms/Scalar/ScalarReplAggregates.cpp +++ b/lib/Transforms/Scalar/ScalarReplAggregates.cpp @@ -38,7 +38,6 @@ #include "llvm/Support/GetElementPtrTypeIterator.h" #include "llvm/Support/IRBuilder.h" #include "llvm/Support/MathExtras.h" -#include "llvm/Support/Compiler.h" #include "llvm/Support/raw_ostream.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/Statistic.h" @@ -50,7 +49,7 @@ STATISTIC(NumConverted, "Number of aggregates converted to scalar"); STATISTIC(NumGlobals, "Number of allocas copied from constant global"); namespace { - struct VISIBILITY_HIDDEN SROA : public FunctionPass { + struct SROA : public FunctionPass { static char ID; // Pass identification, replacement for typeid explicit SROA(signed T = -1) : FunctionPass(&ID) { if (T == -1) diff --git a/lib/Transforms/Scalar/SimplifyCFGPass.cpp b/lib/Transforms/Scalar/SimplifyCFGPass.cpp index ca4292bcaa1..29712b3c13d 100644 --- a/lib/Transforms/Scalar/SimplifyCFGPass.cpp +++ b/lib/Transforms/Scalar/SimplifyCFGPass.cpp @@ -30,7 +30,6 @@ #include "llvm/Module.h" #include "llvm/Attributes.h" #include "llvm/Support/CFG.h" -#include "llvm/Support/Compiler.h" #include "llvm/Pass.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/SmallPtrSet.h" @@ -40,7 +39,7 @@ using namespace llvm; STATISTIC(NumSimpl, "Number of blocks simplified"); namespace { - struct VISIBILITY_HIDDEN CFGSimplifyPass : public FunctionPass { + struct CFGSimplifyPass : public FunctionPass { static char ID; // Pass identification, replacement for typeid CFGSimplifyPass() : FunctionPass(&ID) {} diff --git a/lib/Transforms/Scalar/SimplifyHalfPowrLibCalls.cpp b/lib/Transforms/Scalar/SimplifyHalfPowrLibCalls.cpp index fb3d62e7adc..13077fe642a 100644 --- a/lib/Transforms/Scalar/SimplifyHalfPowrLibCalls.cpp +++ b/lib/Transforms/Scalar/SimplifyHalfPowrLibCalls.cpp @@ -22,15 +22,13 @@ #include "llvm/Transforms/Utils/Cloning.h" #include "llvm/Target/TargetData.h" #include "llvm/ADT/STLExtras.h" -#include "llvm/Support/Compiler.h" #include "llvm/Support/Debug.h" -#include "llvm/Config/config.h" using namespace llvm; namespace { /// This pass optimizes well half_powr function calls. /// - class VISIBILITY_HIDDEN SimplifyHalfPowrLibCalls : public FunctionPass { + class SimplifyHalfPowrLibCalls : public FunctionPass { const TargetData *TD; public: static char ID; // Pass identification @@ -59,8 +57,9 @@ FunctionPass *llvm::createSimplifyHalfPowrLibCallsPass() { /// InlineHalfPowrs - Inline a sequence of adjacent half_powr calls, rearranging /// their control flow to better facilitate subsequent optimization. Instruction * -SimplifyHalfPowrLibCalls::InlineHalfPowrs(const std::vector &HalfPowrs, - Instruction *InsertPt) { +SimplifyHalfPowrLibCalls:: +InlineHalfPowrs(const std::vector &HalfPowrs, + Instruction *InsertPt) { std::vector Bodies; BasicBlock *NewBlock = 0; diff --git a/lib/Transforms/Scalar/SimplifyLibCalls.cpp b/lib/Transforms/Scalar/SimplifyLibCalls.cpp index 761c309c200..32a547398de 100644 --- a/lib/Transforms/Scalar/SimplifyLibCalls.cpp +++ b/lib/Transforms/Scalar/SimplifyLibCalls.cpp @@ -30,7 +30,6 @@ #include "llvm/ADT/StringMap.h" #include "llvm/ADT/Statistic.h" #include "llvm/ADT/STLExtras.h" -#include "llvm/Support/Compiler.h" #include "llvm/Support/Debug.h" #include "llvm/Support/raw_ostream.h" #include "llvm/Config/config.h" @@ -46,7 +45,7 @@ STATISTIC(NumAnnotated, "Number of attributes added to library functions"); /// This class is the abstract base class for the set of optimizations that /// corresponds to one library call. namespace { -class VISIBILITY_HIDDEN LibCallOptimization { +class LibCallOptimization { protected: Function *Caller; const TargetData *TD; @@ -508,7 +507,7 @@ namespace { // 'exit' Optimizations /// ExitOpt - int main() { exit(4); } --> int main() { return 4; } -struct VISIBILITY_HIDDEN ExitOpt : public LibCallOptimization { +struct ExitOpt : public LibCallOptimization { virtual Value *CallOptimizer(Function *Callee, CallInst *CI, IRBuilder<> &B) { // Verify we have a reasonable prototype for exit. if (Callee->arg_size() == 0 || !CI->use_empty()) @@ -552,7 +551,7 @@ struct VISIBILITY_HIDDEN ExitOpt : public LibCallOptimization { //===---------------------------------------===// // 'strcat' Optimizations -struct VISIBILITY_HIDDEN StrCatOpt : public LibCallOptimization { +struct StrCatOpt : public LibCallOptimization { virtual Value *CallOptimizer(Function *Callee, CallInst *CI, IRBuilder<> &B) { // Verify the "strcat" function prototype. const FunctionType *FT = Callee->getFunctionType(); @@ -602,7 +601,7 @@ struct VISIBILITY_HIDDEN StrCatOpt : public LibCallOptimization { //===---------------------------------------===// // 'strncat' Optimizations -struct VISIBILITY_HIDDEN StrNCatOpt : public StrCatOpt { +struct StrNCatOpt : public StrCatOpt { virtual Value *CallOptimizer(Function *Callee, CallInst *CI, IRBuilder<> &B) { // Verify the "strncat" function prototype. const FunctionType *FT = Callee->getFunctionType(); @@ -650,7 +649,7 @@ struct VISIBILITY_HIDDEN StrNCatOpt : public StrCatOpt { //===---------------------------------------===// // 'strchr' Optimizations -struct VISIBILITY_HIDDEN StrChrOpt : public LibCallOptimization { +struct StrChrOpt : public LibCallOptimization { virtual Value *CallOptimizer(Function *Callee, CallInst *CI, IRBuilder<> &B) { // Verify the "strchr" function prototype. const FunctionType *FT = Callee->getFunctionType(); @@ -706,7 +705,7 @@ struct VISIBILITY_HIDDEN StrChrOpt : public LibCallOptimization { //===---------------------------------------===// // 'strcmp' Optimizations -struct VISIBILITY_HIDDEN StrCmpOpt : public LibCallOptimization { +struct StrCmpOpt : public LibCallOptimization { virtual Value *CallOptimizer(Function *Callee, CallInst *CI, IRBuilder<> &B) { // Verify the "strcmp" function prototype. const FunctionType *FT = Callee->getFunctionType(); @@ -753,7 +752,7 @@ struct VISIBILITY_HIDDEN StrCmpOpt : public LibCallOptimization { //===---------------------------------------===// // 'strncmp' Optimizations -struct VISIBILITY_HIDDEN StrNCmpOpt : public LibCallOptimization { +struct StrNCmpOpt : public LibCallOptimization { virtual Value *CallOptimizer(Function *Callee, CallInst *CI, IRBuilder<> &B) { // Verify the "strncmp" function prototype. const FunctionType *FT = Callee->getFunctionType(); @@ -799,7 +798,7 @@ struct VISIBILITY_HIDDEN StrNCmpOpt : public LibCallOptimization { //===---------------------------------------===// // 'strcpy' Optimizations -struct VISIBILITY_HIDDEN StrCpyOpt : public LibCallOptimization { +struct StrCpyOpt : public LibCallOptimization { virtual Value *CallOptimizer(Function *Callee, CallInst *CI, IRBuilder<> &B) { // Verify the "strcpy" function prototype. const FunctionType *FT = Callee->getFunctionType(); @@ -830,7 +829,7 @@ struct VISIBILITY_HIDDEN StrCpyOpt : public LibCallOptimization { //===---------------------------------------===// // 'strncpy' Optimizations -struct VISIBILITY_HIDDEN StrNCpyOpt : public LibCallOptimization { +struct StrNCpyOpt : public LibCallOptimization { virtual Value *CallOptimizer(Function *Callee, CallInst *CI, IRBuilder<> &B) { const FunctionType *FT = Callee->getFunctionType(); if (FT->getNumParams() != 3 || FT->getReturnType() != FT->getParamType(0) || @@ -879,7 +878,7 @@ struct VISIBILITY_HIDDEN StrNCpyOpt : public LibCallOptimization { //===---------------------------------------===// // 'strlen' Optimizations -struct VISIBILITY_HIDDEN StrLenOpt : public LibCallOptimization { +struct StrLenOpt : public LibCallOptimization { virtual Value *CallOptimizer(Function *Callee, CallInst *CI, IRBuilder<> &B) { const FunctionType *FT = Callee->getFunctionType(); if (FT->getNumParams() != 1 || @@ -905,7 +904,7 @@ struct VISIBILITY_HIDDEN StrLenOpt : public LibCallOptimization { //===---------------------------------------===// // 'strto*' Optimizations -struct VISIBILITY_HIDDEN StrToOpt : public LibCallOptimization { +struct StrToOpt : public LibCallOptimization { virtual Value *CallOptimizer(Function *Callee, CallInst *CI, IRBuilder<> &B) { const FunctionType *FT = Callee->getFunctionType(); if ((FT->getNumParams() != 2 && FT->getNumParams() != 3) || @@ -927,7 +926,7 @@ struct VISIBILITY_HIDDEN StrToOpt : public LibCallOptimization { //===---------------------------------------===// // 'memcmp' Optimizations -struct VISIBILITY_HIDDEN MemCmpOpt : public LibCallOptimization { +struct MemCmpOpt : public LibCallOptimization { virtual Value *CallOptimizer(Function *Callee, CallInst *CI, IRBuilder<> &B) { const FunctionType *FT = Callee->getFunctionType(); if (FT->getNumParams() != 3 || !isa(FT->getParamType(0)) || @@ -974,7 +973,7 @@ struct VISIBILITY_HIDDEN MemCmpOpt : public LibCallOptimization { //===---------------------------------------===// // 'memcpy' Optimizations -struct VISIBILITY_HIDDEN MemCpyOpt : public LibCallOptimization { +struct MemCpyOpt : public LibCallOptimization { virtual Value *CallOptimizer(Function *Callee, CallInst *CI, IRBuilder<> &B) { // These optimizations require TargetData. if (!TD) return 0; @@ -995,7 +994,7 @@ struct VISIBILITY_HIDDEN MemCpyOpt : public LibCallOptimization { //===---------------------------------------===// // 'memmove' Optimizations -struct VISIBILITY_HIDDEN MemMoveOpt : public LibCallOptimization { +struct MemMoveOpt : public LibCallOptimization { virtual Value *CallOptimizer(Function *Callee, CallInst *CI, IRBuilder<> &B) { // These optimizations require TargetData. if (!TD) return 0; @@ -1025,7 +1024,7 @@ struct VISIBILITY_HIDDEN MemMoveOpt : public LibCallOptimization { //===---------------------------------------===// // 'memset' Optimizations -struct VISIBILITY_HIDDEN MemSetOpt : public LibCallOptimization { +struct MemSetOpt : public LibCallOptimization { virtual Value *CallOptimizer(Function *Callee, CallInst *CI, IRBuilder<> &B) { // These optimizations require TargetData. if (!TD) return 0; @@ -1051,7 +1050,7 @@ struct VISIBILITY_HIDDEN MemSetOpt : public LibCallOptimization { //===---------------------------------------===// // 'pow*' Optimizations -struct VISIBILITY_HIDDEN PowOpt : public LibCallOptimization { +struct PowOpt : public LibCallOptimization { virtual Value *CallOptimizer(Function *Callee, CallInst *CI, IRBuilder<> &B) { const FunctionType *FT = Callee->getFunctionType(); // Just make sure this has 2 arguments of the same FP type, which match the @@ -1102,7 +1101,7 @@ struct VISIBILITY_HIDDEN PowOpt : public LibCallOptimization { //===---------------------------------------===// // 'exp2' Optimizations -struct VISIBILITY_HIDDEN Exp2Opt : public LibCallOptimization { +struct Exp2Opt : public LibCallOptimization { virtual Value *CallOptimizer(Function *Callee, CallInst *CI, IRBuilder<> &B) { const FunctionType *FT = Callee->getFunctionType(); // Just make sure this has 1 argument of FP type, which matches the @@ -1152,7 +1151,7 @@ struct VISIBILITY_HIDDEN Exp2Opt : public LibCallOptimization { //===---------------------------------------===// // Double -> Float Shrinking Optimizations for Unary Functions like 'floor' -struct VISIBILITY_HIDDEN UnaryDoubleFPOpt : public LibCallOptimization { +struct UnaryDoubleFPOpt : public LibCallOptimization { virtual Value *CallOptimizer(Function *Callee, CallInst *CI, IRBuilder<> &B) { const FunctionType *FT = Callee->getFunctionType(); if (FT->getNumParams() != 1 || FT->getReturnType() != Type::getDoubleTy(*Context) || @@ -1178,7 +1177,7 @@ struct VISIBILITY_HIDDEN UnaryDoubleFPOpt : public LibCallOptimization { //===---------------------------------------===// // 'ffs*' Optimizations -struct VISIBILITY_HIDDEN FFSOpt : public LibCallOptimization { +struct FFSOpt : public LibCallOptimization { virtual Value *CallOptimizer(Function *Callee, CallInst *CI, IRBuilder<> &B) { const FunctionType *FT = Callee->getFunctionType(); // Just make sure this has 2 arguments of the same FP type, which match the @@ -1213,7 +1212,7 @@ struct VISIBILITY_HIDDEN FFSOpt : public LibCallOptimization { //===---------------------------------------===// // 'isdigit' Optimizations -struct VISIBILITY_HIDDEN IsDigitOpt : public LibCallOptimization { +struct IsDigitOpt : public LibCallOptimization { virtual Value *CallOptimizer(Function *Callee, CallInst *CI, IRBuilder<> &B) { const FunctionType *FT = Callee->getFunctionType(); // We require integer(i32) @@ -1234,7 +1233,7 @@ struct VISIBILITY_HIDDEN IsDigitOpt : public LibCallOptimization { //===---------------------------------------===// // 'isascii' Optimizations -struct VISIBILITY_HIDDEN IsAsciiOpt : public LibCallOptimization { +struct IsAsciiOpt : public LibCallOptimization { virtual Value *CallOptimizer(Function *Callee, CallInst *CI, IRBuilder<> &B) { const FunctionType *FT = Callee->getFunctionType(); // We require integer(i32) @@ -1253,7 +1252,7 @@ struct VISIBILITY_HIDDEN IsAsciiOpt : public LibCallOptimization { //===---------------------------------------===// // 'abs', 'labs', 'llabs' Optimizations -struct VISIBILITY_HIDDEN AbsOpt : public LibCallOptimization { +struct AbsOpt : public LibCallOptimization { virtual Value *CallOptimizer(Function *Callee, CallInst *CI, IRBuilder<> &B) { const FunctionType *FT = Callee->getFunctionType(); // We require integer(integer) where the types agree. @@ -1275,7 +1274,7 @@ struct VISIBILITY_HIDDEN AbsOpt : public LibCallOptimization { //===---------------------------------------===// // 'toascii' Optimizations -struct VISIBILITY_HIDDEN ToAsciiOpt : public LibCallOptimization { +struct ToAsciiOpt : public LibCallOptimization { virtual Value *CallOptimizer(Function *Callee, CallInst *CI, IRBuilder<> &B) { const FunctionType *FT = Callee->getFunctionType(); // We require i32(i32) @@ -1296,7 +1295,7 @@ struct VISIBILITY_HIDDEN ToAsciiOpt : public LibCallOptimization { //===---------------------------------------===// // 'printf' Optimizations -struct VISIBILITY_HIDDEN PrintFOpt : public LibCallOptimization { +struct PrintFOpt : public LibCallOptimization { virtual Value *CallOptimizer(Function *Callee, CallInst *CI, IRBuilder<> &B) { // Require one fixed pointer argument and an integer/void result. const FunctionType *FT = Callee->getFunctionType(); @@ -1359,7 +1358,7 @@ struct VISIBILITY_HIDDEN PrintFOpt : public LibCallOptimization { //===---------------------------------------===// // 'sprintf' Optimizations -struct VISIBILITY_HIDDEN SPrintFOpt : public LibCallOptimization { +struct SPrintFOpt : public LibCallOptimization { virtual Value *CallOptimizer(Function *Callee, CallInst *CI, IRBuilder<> &B) { // Require two fixed pointer arguments and an integer result. const FunctionType *FT = Callee->getFunctionType(); @@ -1431,7 +1430,7 @@ struct VISIBILITY_HIDDEN SPrintFOpt : public LibCallOptimization { //===---------------------------------------===// // 'fwrite' Optimizations -struct VISIBILITY_HIDDEN FWriteOpt : public LibCallOptimization { +struct FWriteOpt : public LibCallOptimization { virtual Value *CallOptimizer(Function *Callee, CallInst *CI, IRBuilder<> &B) { // Require a pointer, an integer, an integer, a pointer, returning integer. const FunctionType *FT = Callee->getFunctionType(); @@ -1466,7 +1465,7 @@ struct VISIBILITY_HIDDEN FWriteOpt : public LibCallOptimization { //===---------------------------------------===// // 'fputs' Optimizations -struct VISIBILITY_HIDDEN FPutsOpt : public LibCallOptimization { +struct FPutsOpt : public LibCallOptimization { virtual Value *CallOptimizer(Function *Callee, CallInst *CI, IRBuilder<> &B) { // These optimizations require TargetData. if (!TD) return 0; @@ -1491,7 +1490,7 @@ struct VISIBILITY_HIDDEN FPutsOpt : public LibCallOptimization { //===---------------------------------------===// // 'fprintf' Optimizations -struct VISIBILITY_HIDDEN FPrintFOpt : public LibCallOptimization { +struct FPrintFOpt : public LibCallOptimization { virtual Value *CallOptimizer(Function *Callee, CallInst *CI, IRBuilder<> &B) { // Require two fixed paramters as pointers and integer result. const FunctionType *FT = Callee->getFunctionType(); @@ -1553,7 +1552,7 @@ struct VISIBILITY_HIDDEN FPrintFOpt : public LibCallOptimization { namespace { /// This pass optimizes well known library functions from libc and libm. /// - class VISIBILITY_HIDDEN SimplifyLibCalls : public FunctionPass { + class SimplifyLibCalls : public FunctionPass { StringMap Optimizations; // Miscellaneous LibCall Optimizations ExitOpt Exit; diff --git a/lib/Transforms/Scalar/TailDuplication.cpp b/lib/Transforms/Scalar/TailDuplication.cpp index 4bd9436ab18..4bad7081166 100644 --- a/lib/Transforms/Scalar/TailDuplication.cpp +++ b/lib/Transforms/Scalar/TailDuplication.cpp @@ -30,7 +30,6 @@ #include "llvm/Analysis/ConstantFolding.h" #include "llvm/Transforms/Utils/Local.h" #include "llvm/Support/CommandLine.h" -#include "llvm/Support/Compiler.h" #include "llvm/Support/Debug.h" #include "llvm/Support/raw_ostream.h" #include "llvm/ADT/Statistic.h" @@ -46,7 +45,7 @@ TailDupThreshold("taildup-threshold", cl::init(1), cl::Hidden); namespace { - class VISIBILITY_HIDDEN TailDup : public FunctionPass { + class TailDup : public FunctionPass { bool runOnFunction(Function &F); public: static char ID; // Pass identification, replacement for typeid diff --git a/lib/Transforms/Scalar/TailRecursionElimination.cpp b/lib/Transforms/Scalar/TailRecursionElimination.cpp index b84a1f04ca3..b56e17040db 100644 --- a/lib/Transforms/Scalar/TailRecursionElimination.cpp +++ b/lib/Transforms/Scalar/TailRecursionElimination.cpp @@ -60,14 +60,13 @@ #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 VISIBILITY_HIDDEN TailCallElim : public FunctionPass { + struct TailCallElim : public FunctionPass { static char ID; // Pass identification, replacement for typeid TailCallElim() : FunctionPass(&ID) {}