From: NAKAMURA Takumi Date: Mon, 14 Sep 2015 11:14:39 +0000 (+0000) Subject: Whitespace. X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=commitdiff_plain;h=fadc359170b3ad198fc961d677a0ee7af1bca560 Whitespace. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247543 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/Analysis/AliasSetTracker.h b/include/llvm/Analysis/AliasSetTracker.h index 5adfb4f74d6..0637378e149 100644 --- a/include/llvm/Analysis/AliasSetTracker.h +++ b/include/llvm/Analysis/AliasSetTracker.h @@ -48,7 +48,7 @@ class AliasSet : public ilist_node { AAInfo(DenseMapInfo::getEmptyKey()) {} Value *getValue() const { return Val; } - + PointerRec *getNext() const { return NextInList; } bool hasAliasSet() const { return AS != nullptr; } @@ -156,7 +156,7 @@ class AliasSet : public ilist_node { assert(i < UnknownInsts.size()); return UnknownInsts[i]; } - + public: /// Accessors... bool isRef() const { return Access & RefAccess; } @@ -347,7 +347,7 @@ public: bool remove(Instruction *I); void remove(AliasSet &AS); bool removeUnknown(Instruction *I); - + void clear(); /// getAliasSets - Return the alias sets that are active. diff --git a/include/llvm/Analysis/CallGraphSCCPass.h b/include/llvm/Analysis/CallGraphSCCPass.h index 667e1715775..5dd10fb7323 100644 --- a/include/llvm/Analysis/CallGraphSCCPass.h +++ b/include/llvm/Analysis/CallGraphSCCPass.h @@ -30,7 +30,7 @@ class CallGraphNode; class CallGraph; class PMStack; class CallGraphSCC; - + class CallGraphSCCPass : public Pass { public: explicit CallGraphSCCPass(char &pid) : Pass(PT_CallGraphSCC, pid) {} @@ -79,24 +79,24 @@ public: void getAnalysisUsage(AnalysisUsage &Info) const override; }; -/// CallGraphSCC - This is a single SCC that a CallGraphSCCPass is run on. +/// CallGraphSCC - This is a single SCC that a CallGraphSCCPass is run on. class CallGraphSCC { void *Context; // The CGPassManager object that is vending this. std::vector Nodes; public: CallGraphSCC(void *context) : Context(context) {} - + void initialize(CallGraphNode*const*I, CallGraphNode*const*E) { Nodes.assign(I, E); } - + bool isSingular() const { return Nodes.size() == 1; } unsigned size() const { return Nodes.size(); } - + /// ReplaceNode - This informs the SCC and the pass manager that the specified /// Old node has been deleted, and New is to be used in its place. void ReplaceNode(CallGraphNode *Old, CallGraphNode *New); - + typedef std::vector::const_iterator iterator; iterator begin() const { return Nodes.begin(); } iterator end() const { return Nodes.end(); } diff --git a/include/llvm/Analysis/DependenceAnalysis.h b/include/llvm/Analysis/DependenceAnalysis.h index 974313e29e2..a721852a012 100644 --- a/include/llvm/Analysis/DependenceAnalysis.h +++ b/include/llvm/Analysis/DependenceAnalysis.h @@ -71,7 +71,7 @@ namespace llvm { class Dependence { protected: Dependence(const Dependence &) = default; - + // FIXME: When we move to MSVC 2015 as the base compiler for Visual Studio // support, uncomment this line to allow a defaulted move constructor for // Dependence. Currently, FullDependence relies on the copy constructor, but @@ -188,25 +188,25 @@ namespace llvm { const Dependence *getNextPredecessor() const { return NextPredecessor; } - + /// getNextSuccessor - Returns the value of the NextSuccessor /// field. const Dependence *getNextSuccessor() const { return NextSuccessor; } - + /// setNextPredecessor - Sets the value of the NextPredecessor /// field. void setNextPredecessor(const Dependence *pred) { NextPredecessor = pred; } - + /// setNextSuccessor - Sets the value of the NextSuccessor /// field. void setNextSuccessor(const Dependence *succ) { NextSuccessor = succ; } - + /// dump - For debugging purposes, dumps a dependence to OS. /// void dump(raw_ostream &OS) const; @@ -534,10 +534,10 @@ namespace llvm { /// in LoopNest. bool isLoopInvariant(const SCEV *Expression, const Loop *LoopNest) const; - /// Makes sure all subscript pairs share the same integer type by + /// Makes sure all subscript pairs share the same integer type by /// sign-extending as necessary. /// Sign-extending a subscript is safe because getelementptr assumes the - /// array subscripts are signed. + /// array subscripts are signed. void unifySubscriptType(ArrayRef Pairs); /// removeMatchingExtensions - Examines a subscript pair. diff --git a/include/llvm/Analysis/MemoryDependenceAnalysis.h b/include/llvm/Analysis/MemoryDependenceAnalysis.h index 71759d0d57d..40348c50d08 100644 --- a/include/llvm/Analysis/MemoryDependenceAnalysis.h +++ b/include/llvm/Analysis/MemoryDependenceAnalysis.h @@ -370,7 +370,7 @@ namespace llvm { /// /// Warning: For a volatile query instruction, the dependencies will be /// accurate, and thus usable for reordering, but it is never legal to - /// remove the query instruction. + /// remove the query instruction. /// /// This method assumes the pointer has a "NonLocal" dependency within /// QueryInst's parent basic block. @@ -398,7 +398,7 @@ namespace llvm { /// location depends. If isLoad is true, this routine ignores may-aliases /// with read-only operations. If isLoad is false, this routine ignores /// may-aliases with reads from read-only locations. If possible, pass - /// the query instruction as well; this function may take advantage of + /// the query instruction as well; this function may take advantage of /// the metadata annotated to the query instruction to refine the result. /// /// Note that this is an uncached query, and thus may be inefficient. diff --git a/include/llvm/Analysis/PHITransAddr.h b/include/llvm/Analysis/PHITransAddr.h index cbdbb88f740..ea0b23530b1 100644 --- a/include/llvm/Analysis/PHITransAddr.h +++ b/include/llvm/Analysis/PHITransAddr.h @@ -55,9 +55,9 @@ public: if (Instruction *I = dyn_cast(Addr)) InstInputs.push_back(I); } - + Value *getAddr() const { return Addr; } - + /// NeedsPHITranslationFromBlock - Return true if moving from the specified /// BasicBlock to its predecessors requires PHI translation. bool NeedsPHITranslationFromBlock(BasicBlock *BB) const { @@ -68,12 +68,12 @@ public: return true; return false; } - + /// IsPotentiallyPHITranslatable - If this needs PHI translation, return true /// if we have some hope of doing it. This should be used as a filter to /// avoid calling PHITranslateValue in hopeless situations. bool IsPotentiallyPHITranslatable() const; - + /// PHITranslateValue - PHI translate the current address up the CFG from /// CurBB to Pred, updating our state to reflect any needed changes. If /// 'MustDominate' is true, the translated value must dominate @@ -91,9 +91,9 @@ public: Value *PHITranslateWithInsertion(BasicBlock *CurBB, BasicBlock *PredBB, const DominatorTree &DT, SmallVectorImpl &NewInsts); - + void dump() const; - + /// Verify - Check internal consistency of this data structure. If the /// structure is valid, it returns true. If invalid, it prints errors and /// returns false. @@ -101,7 +101,7 @@ public: private: Value *PHITranslateSubExpr(Value *V, BasicBlock *CurBB, BasicBlock *PredBB, const DominatorTree *DT); - + /// InsertPHITranslatedSubExpr - Insert a computation of the PHI translated /// version of 'V' for the edge PredBB->CurBB into the end of the PredBB /// block. All newly created instructions are added to the NewInsts list. @@ -110,7 +110,7 @@ private: Value *InsertPHITranslatedSubExpr(Value *InVal, BasicBlock *CurBB, BasicBlock *PredBB, const DominatorTree &DT, SmallVectorImpl &NewInsts); - + /// AddAsInput - If the specified value is an instruction, add it as an input. Value *AddAsInput(Value *V) { // If V is an instruction, it is now an input. @@ -118,7 +118,7 @@ private: InstInputs.push_back(VI); return V; } - + }; } // end namespace llvm diff --git a/include/llvm/Analysis/SparsePropagation.h b/include/llvm/Analysis/SparsePropagation.h index 9ccae5ff89b..353b127a568 100644 --- a/include/llvm/Analysis/SparsePropagation.h +++ b/include/llvm/Analysis/SparsePropagation.h @@ -33,7 +33,7 @@ namespace llvm { class raw_ostream; template class SmallVectorImpl; - + /// AbstractLatticeFunction - This class is implemented by the dataflow instance /// to specify what the lattice values are and how they handle merges etc. /// This gives the client the power to compute lattice values from instructions, @@ -54,18 +54,18 @@ public: UntrackedVal = untrackedVal; } virtual ~AbstractLatticeFunction(); - + LatticeVal getUndefVal() const { return UndefVal; } LatticeVal getOverdefinedVal() const { return OverdefinedVal; } LatticeVal getUntrackedVal() const { return UntrackedVal; } - + /// IsUntrackedValue - If the specified Value is something that is obviously /// uninteresting to the analysis (and would always return UntrackedVal), /// this function can return true to avoid pointless work. virtual bool IsUntrackedValue(Value *V) { return false; } - + /// ComputeConstant - Given a constant value, compute and return a lattice /// value corresponding to the specified constant. virtual LatticeVal ComputeConstant(Constant *C) { @@ -77,7 +77,7 @@ public: virtual bool IsSpecialCasedPHI(PHINode *PN) { return false; } - + /// GetConstant - If the specified lattice value is representable as an LLVM /// constant value, return it. Otherwise return null. The returned value /// must be in the same LLVM type as Val. @@ -90,42 +90,42 @@ public: virtual LatticeVal ComputeArgument(Argument *I) { return getOverdefinedVal(); // always safe } - + /// MergeValues - Compute and return the merge of the two specified lattice /// values. Merging should only move one direction down the lattice to /// guarantee convergence (toward overdefined). virtual LatticeVal MergeValues(LatticeVal X, LatticeVal Y) { return getOverdefinedVal(); // always safe, never useful. } - + /// ComputeInstructionState - Given an instruction and a vector of its operand /// values, compute the result value of the instruction. virtual LatticeVal ComputeInstructionState(Instruction &I, SparseSolver &SS) { return getOverdefinedVal(); // always safe, never useful. } - + /// PrintValue - Render the specified lattice value to the specified stream. virtual void PrintValue(LatticeVal V, raw_ostream &OS); }; - + /// SparseSolver - This class is a general purpose solver for Sparse Conditional /// Propagation with a programmable lattice function. /// class SparseSolver { typedef AbstractLatticeFunction::LatticeVal LatticeVal; - + /// LatticeFunc - This is the object that knows the lattice and how to do /// compute transfer functions. AbstractLatticeFunction *LatticeFunc; - + DenseMap ValueState; // The state each value is in. SmallPtrSet BBExecutable; // The bbs that are executable. - + std::vector InstWorkList; // Worklist of insts to process. - + std::vector BBWorkList; // The BasicBlock work list - + /// KnownFeasibleEdges - Entries in this set are edges which have already had /// PHI nodes retriggered. typedef std::pair Edge; @@ -139,11 +139,11 @@ public: ~SparseSolver() { delete LatticeFunc; } - + /// Solve - Solve for constants and executable blocks. /// void Solve(Function &F); - + void Print(Function &F, raw_ostream &OS) const; /// getLatticeState - Return the LatticeVal object that corresponds to the @@ -153,7 +153,7 @@ public: DenseMap::const_iterator I = ValueState.find(V); return I != ValueState.end() ? I->second : LatticeFunc->getUntrackedVal(); } - + /// getOrInitValueState - Return the LatticeVal object that corresponds to the /// value, initializing the value's state if it hasn't been entered into the /// map yet. This function is necessary because not all values should start @@ -161,7 +161,7 @@ public: /// constants should be marked as constants. /// LatticeVal getOrInitValueState(Value *V); - + /// isEdgeFeasible - Return true if the control flow edge from the 'From' /// basic block to the 'To' basic block is currently feasible. If /// AggressiveUndef is true, then this treats values with unknown lattice @@ -176,25 +176,25 @@ public: bool isBlockExecutable(BasicBlock *BB) const { return BBExecutable.count(BB); } - + private: /// UpdateState - When the state for some instruction is potentially updated, /// this function notices and adds I to the worklist if needed. void UpdateState(Instruction &Inst, LatticeVal V); - + /// MarkBlockExecutable - This method can be used by clients to mark all of /// the blocks that are known to be intrinsically live in the processed unit. void MarkBlockExecutable(BasicBlock *BB); - + /// markEdgeExecutable - Mark a basic block as executable, adding it to the BB /// work list if it is not already executable. void markEdgeExecutable(BasicBlock *Source, BasicBlock *Dest); - + /// getFeasibleSuccessors - Return a vector of booleans to indicate which /// successors are reachable from a given terminator instruction. void getFeasibleSuccessors(TerminatorInst &TI, SmallVectorImpl &Succs, bool AggressiveUndef); - + void visitInst(Instruction &I); void visitPHINode(PHINode &I); void visitTerminatorInst(TerminatorInst &TI); diff --git a/include/llvm/Analysis/ValueTracking.h b/include/llvm/Analysis/ValueTracking.h index aadd607040b..53b2e61ee6e 100644 --- a/include/llvm/Analysis/ValueTracking.h +++ b/include/llvm/Analysis/ValueTracking.h @@ -126,12 +126,12 @@ namespace llvm { bool LookThroughSExt = false, unsigned Depth = 0); - /// CannotBeNegativeZero - Return true if we can prove that the specified FP + /// CannotBeNegativeZero - Return true if we can prove that the specified FP /// value is never equal to -0.0. /// bool CannotBeNegativeZero(const Value *V, unsigned Depth = 0); - /// CannotBeOrderedLessThanZero - Return true if we can prove that the + /// CannotBeOrderedLessThanZero - Return true if we can prove that the /// specified FP value is either a NaN or never less than 0.0. /// bool CannotBeOrderedLessThanZero(const Value *V, unsigned Depth = 0); @@ -142,7 +142,7 @@ namespace llvm { /// i16 0xF0F0, double 0.0 etc. If the value can't be handled with a repeated /// byte store (e.g. i16 0x1234), return null. Value *isBytewiseValue(Value *V); - + /// FindInsertedValue - Given an aggregrate and an sequence of indices, see if /// the scalar value indexed is already around as a register, for example if /// it were inserted directly into the aggregrate. @@ -164,7 +164,7 @@ namespace llvm { return GetPointerBaseWithConstantOffset(const_cast(Ptr), Offset, DL); } - + /// getConstantStringInfo - This function computes the length of a /// null-terminated C string pointed to by V. If successful, it returns true /// and returns the string in Str. If unsuccessful, it returns false. This @@ -245,7 +245,7 @@ namespace llvm { const Instruction *CtxI = nullptr, const DominatorTree *DT = nullptr, const TargetLibraryInfo *TLI = nullptr); - + /// isSafeToSpeculativelyExecute - Return true if the instruction does not /// have any effects besides calculating the result and does not have /// undefined behavior. diff --git a/include/llvm/Analysis/VectorUtils.h b/include/llvm/Analysis/VectorUtils.h index cd9102e571c..125a56a530b 100644 --- a/include/llvm/Analysis/VectorUtils.h +++ b/include/llvm/Analysis/VectorUtils.h @@ -62,8 +62,8 @@ Intrinsic::ID getIntrinsicIDForCall(CallInst *CI, const TargetLibraryInfo *TLI); /// pointer. unsigned getGEPInductionOperand(const GetElementPtrInst *Gep); -/// \brief If the argument is a GEP, then returns the operand identified by -/// getGEPInductionOperand. However, if there is some other non-loop-invariant +/// \brief If the argument is a GEP, then returns the operand identified by +/// getGEPInductionOperand. However, if there is some other non-loop-invariant /// operand, it returns that instead. Value *stripGetElementPtr(Value *Ptr, ScalarEvolution *SE, Loop *Lp);