Remove trailing spaces.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174791 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jakub Staszak 2013-02-09 01:19:12 +00:00
parent 29521a0fb9
commit 882b9276cb

View File

@ -34,14 +34,14 @@ namespace llvm {
class PredIteratorCache; class PredIteratorCache;
class DominatorTree; class DominatorTree;
class PHITransAddr; class PHITransAddr;
/// MemDepResult - A memory dependence query can return one of three different /// MemDepResult - A memory dependence query can return one of three different
/// answers, described below. /// answers, described below.
class MemDepResult { class MemDepResult {
enum DepType { enum DepType {
/// Invalid - Clients of MemDep never see this. /// Invalid - Clients of MemDep never see this.
Invalid = 0, Invalid = 0,
/// Clobber - This is a dependence on the specified instruction which /// Clobber - This is a dependence on the specified instruction which
/// clobbers the desired value. The pointer member of the MemDepResult /// clobbers the desired value. The pointer member of the MemDepResult
/// pair holds the instruction that clobbers the memory. For example, /// pair holds the instruction that clobbers the memory. For example,
@ -72,7 +72,7 @@ namespace llvm {
/// and no intervening clobbers. No validation is done that the /// and no intervening clobbers. No validation is done that the
/// operands to the calls are the same. /// operands to the calls are the same.
Def, Def,
/// Other - This marker indicates that the query has no known dependency /// Other - This marker indicates that the query has no known dependency
/// in the specified block. More detailed state info is encoded in the /// in the specified block. More detailed state info is encoded in the
/// upper part of the pair (i.e. the Instruction*) /// upper part of the pair (i.e. the Instruction*)
@ -99,7 +99,7 @@ namespace llvm {
explicit MemDepResult(PairTy V) : Value(V) {} explicit MemDepResult(PairTy V) : Value(V) {}
public: public:
MemDepResult() : Value(0, Invalid) {} MemDepResult() : Value(0, Invalid) {}
/// get methods: These are static ctor methods for creating various /// get methods: These are static ctor methods for creating various
/// MemDepResult kinds. /// MemDepResult kinds.
static MemDepResult getDef(Instruction *Inst) { static MemDepResult getDef(Instruction *Inst) {
@ -130,7 +130,7 @@ namespace llvm {
/// isDef - Return true if this MemDepResult represents a query that is /// isDef - Return true if this MemDepResult represents a query that is
/// an instruction definition dependency. /// an instruction definition dependency.
bool isDef() const { return Value.getInt() == Def; } bool isDef() const { return Value.getInt() == Def; }
/// isNonLocal - Return true if this MemDepResult represents a query that /// isNonLocal - Return true if this MemDepResult represents a query that
/// is transparent to the start of the block, but where a non-local hasn't /// is transparent to the start of the block, but where a non-local hasn't
/// been done. /// been done.
@ -145,7 +145,7 @@ namespace llvm {
return Value.getInt() == Other return Value.getInt() == Other
&& Value.getPointer() == reinterpret_cast<Instruction*>(NonFuncLocal); && Value.getPointer() == reinterpret_cast<Instruction*>(NonFuncLocal);
} }
/// isUnknown - Return true if this MemDepResult represents a query which /// isUnknown - Return true if this MemDepResult represents a query which
/// cannot and/or will not be computed. /// cannot and/or will not be computed.
bool isUnknown() const { bool isUnknown() const {
@ -159,7 +159,7 @@ namespace llvm {
if (Value.getInt() == Other) return NULL; if (Value.getInt() == Other) return NULL;
return Value.getPointer(); return Value.getPointer();
} }
bool operator==(const MemDepResult &M) const { return Value == M.Value; } bool operator==(const MemDepResult &M) const { return Value == M.Value; }
bool operator!=(const MemDepResult &M) const { return Value != M.Value; } bool operator!=(const MemDepResult &M) const { return Value != M.Value; }
bool operator<(const MemDepResult &M) const { return Value < M.Value; } bool operator<(const MemDepResult &M) const { return Value < M.Value; }
@ -175,11 +175,11 @@ namespace llvm {
/// In a default-constructed MemDepResult object, the type will be Dirty /// In a default-constructed MemDepResult object, the type will be Dirty
/// and the instruction pointer will be null. /// and the instruction pointer will be null.
/// ///
/// isDirty - Return true if this is a MemDepResult in its dirty/invalid. /// isDirty - Return true if this is a MemDepResult in its dirty/invalid.
/// state. /// state.
bool isDirty() const { return Value.getInt() == Invalid; } bool isDirty() const { return Value.getInt() == Invalid; }
static MemDepResult getDirty(Instruction *Inst) { static MemDepResult getDirty(Instruction *Inst) {
return MemDepResult(PairTy(Inst, Invalid)); return MemDepResult(PairTy(Inst, Invalid));
} }
@ -199,16 +199,16 @@ namespace llvm {
// BB is the sort key, it can't be changed. // BB is the sort key, it can't be changed.
BasicBlock *getBB() const { return BB; } BasicBlock *getBB() const { return BB; }
void setResult(const MemDepResult &R) { Result = R; } void setResult(const MemDepResult &R) { Result = R; }
const MemDepResult &getResult() const { return Result; } const MemDepResult &getResult() const { return Result; }
bool operator<(const NonLocalDepEntry &RHS) const { bool operator<(const NonLocalDepEntry &RHS) const {
return BB < RHS.BB; return BB < RHS.BB;
} }
}; };
/// NonLocalDepResult - This is a result from a NonLocal dependence query. /// NonLocalDepResult - This is a result from a NonLocal dependence query.
/// For each BasicBlock (the BB entry) it keeps a MemDepResult and the /// For each BasicBlock (the BB entry) it keeps a MemDepResult and the
/// (potentially phi translated) address that was live in the block. /// (potentially phi translated) address that was live in the block.
@ -218,17 +218,17 @@ namespace llvm {
public: public:
NonLocalDepResult(BasicBlock *bb, MemDepResult result, Value *address) NonLocalDepResult(BasicBlock *bb, MemDepResult result, Value *address)
: Entry(bb, result), Address(address) {} : Entry(bb, result), Address(address) {}
// BB is the sort key, it can't be changed. // BB is the sort key, it can't be changed.
BasicBlock *getBB() const { return Entry.getBB(); } BasicBlock *getBB() const { return Entry.getBB(); }
void setResult(const MemDepResult &R, Value *Addr) { void setResult(const MemDepResult &R, Value *Addr) {
Entry.setResult(R); Entry.setResult(R);
Address = Addr; Address = Addr;
} }
const MemDepResult &getResult() const { return Entry.getResult(); } const MemDepResult &getResult() const { return Entry.getResult(); }
/// getAddress - Return the address of this pointer in this block. This can /// getAddress - Return the address of this pointer in this block. This can
/// be different than the address queried for the non-local result because /// be different than the address queried for the non-local result because
/// of phi translation. This returns null if the address was not available /// of phi translation. This returns null if the address was not available
@ -238,7 +238,7 @@ namespace llvm {
/// The address is always null for a non-local 'call' dependence. /// The address is always null for a non-local 'call' dependence.
Value *getAddress() const { return Address; } Value *getAddress() const { return Address; }
}; };
/// MemoryDependenceAnalysis - This is an analysis that determines, for a /// MemoryDependenceAnalysis - This is an analysis that determines, for a
/// given memory operation, what preceding memory operations it depends on. /// given memory operation, what preceding memory operations it depends on.
/// It builds on alias analysis information, and tries to provide a lazy, /// It builds on alias analysis information, and tries to provide a lazy,
@ -297,30 +297,30 @@ namespace llvm {
CachedNonLocalPointerInfo NonLocalPointerDeps; CachedNonLocalPointerInfo NonLocalPointerDeps;
// A map from instructions to their non-local pointer dependencies. // A map from instructions to their non-local pointer dependencies.
typedef DenseMap<Instruction*, typedef DenseMap<Instruction*,
SmallPtrSet<ValueIsLoadPair, 4> > ReverseNonLocalPtrDepTy; SmallPtrSet<ValueIsLoadPair, 4> > ReverseNonLocalPtrDepTy;
ReverseNonLocalPtrDepTy ReverseNonLocalPtrDeps; ReverseNonLocalPtrDepTy ReverseNonLocalPtrDeps;
/// PerInstNLInfo - This is the instruction we keep for each cached access /// PerInstNLInfo - This is the instruction we keep for each cached access
/// that we have for an instruction. The pointer is an owning pointer and /// that we have for an instruction. The pointer is an owning pointer and
/// the bool indicates whether we have any dirty bits in the set. /// the bool indicates whether we have any dirty bits in the set.
typedef std::pair<NonLocalDepInfo, bool> PerInstNLInfo; typedef std::pair<NonLocalDepInfo, bool> PerInstNLInfo;
// A map from instructions to their non-local dependencies. // A map from instructions to their non-local dependencies.
typedef DenseMap<Instruction*, PerInstNLInfo> NonLocalDepMapType; typedef DenseMap<Instruction*, PerInstNLInfo> NonLocalDepMapType;
NonLocalDepMapType NonLocalDeps; NonLocalDepMapType NonLocalDeps;
// A reverse mapping from dependencies to the dependees. This is // A reverse mapping from dependencies to the dependees. This is
// used when removing instructions to keep the cache coherent. // used when removing instructions to keep the cache coherent.
typedef DenseMap<Instruction*, typedef DenseMap<Instruction*,
SmallPtrSet<Instruction*, 4> > ReverseDepMapType; SmallPtrSet<Instruction*, 4> > ReverseDepMapType;
ReverseDepMapType ReverseLocalDeps; ReverseDepMapType ReverseLocalDeps;
// A reverse mapping from dependencies to the non-local dependees. // A reverse mapping from dependencies to the non-local dependees.
ReverseDepMapType ReverseNonLocalDeps; ReverseDepMapType ReverseNonLocalDeps;
/// Current AA implementation, just a cache. /// Current AA implementation, just a cache.
AliasAnalysis *AA; AliasAnalysis *AA;
DataLayout *TD; DataLayout *TD;
@ -333,15 +333,15 @@ namespace llvm {
/// Pass Implementation stuff. This doesn't do any analysis eagerly. /// Pass Implementation stuff. This doesn't do any analysis eagerly.
bool runOnFunction(Function &); bool runOnFunction(Function &);
/// Clean up memory in between runs /// Clean up memory in between runs
void releaseMemory(); void releaseMemory();
/// getAnalysisUsage - Does not modify anything. It uses Value Numbering /// getAnalysisUsage - Does not modify anything. It uses Value Numbering
/// and Alias Analysis. /// and Alias Analysis.
/// ///
virtual void getAnalysisUsage(AnalysisUsage &AU) const; virtual void getAnalysisUsage(AnalysisUsage &AU) const;
/// getDependency - Return the instruction on which a memory operation /// getDependency - Return the instruction on which a memory operation
/// depends. See the class comment for more details. It is illegal to call /// depends. See the class comment for more details. It is illegal to call
/// this on non-memory instructions. /// this on non-memory instructions.
@ -360,8 +360,8 @@ namespace llvm {
/// removed. Clients must copy this data if they want it around longer than /// removed. Clients must copy this data if they want it around longer than
/// that. /// that.
const NonLocalDepInfo &getNonLocalCallDependency(CallSite QueryCS); const NonLocalDepInfo &getNonLocalCallDependency(CallSite QueryCS);
/// getNonLocalPointerDependency - Perform a full dependency query for an /// getNonLocalPointerDependency - Perform a full dependency query for an
/// access to the specified (non-volatile) memory location, returning the /// access to the specified (non-volatile) memory location, returning the
/// set of instructions that either define or clobber the value. /// set of instructions that either define or clobber the value.
@ -374,7 +374,7 @@ namespace llvm {
/// removeInstruction - Remove an instruction from the dependence analysis, /// removeInstruction - Remove an instruction from the dependence analysis,
/// updating the dependence of instructions that previously depended on it. /// updating the dependence of instructions that previously depended on it.
void removeInstruction(Instruction *InstToRemove); void removeInstruction(Instruction *InstToRemove);
/// invalidateCachedPointerInfo - This method is used to invalidate cached /// invalidateCachedPointerInfo - This method is used to invalidate cached
/// information about the specified pointer, because it may be too /// information about the specified pointer, because it may be too
/// conservative in memdep. This is an optional call that can be used when /// conservative in memdep. This is an optional call that can be used when
@ -387,7 +387,7 @@ namespace llvm {
/// This needs to be done when the CFG changes, e.g., due to splitting /// This needs to be done when the CFG changes, e.g., due to splitting
/// critical edges. /// critical edges.
void invalidateCachedPredecessors(); void invalidateCachedPredecessors();
/// getPointerDependencyFrom - Return the instruction on which a memory /// getPointerDependencyFrom - Return the instruction on which a memory
/// location depends. If isLoad is true, this routine ignores may-aliases /// location depends. If isLoad is true, this routine ignores may-aliases
/// with read-only operations. If isLoad is false, this routine ignores /// with read-only operations. If isLoad is false, this routine ignores
@ -396,11 +396,11 @@ namespace llvm {
/// Note that this is an uncached query, and thus may be inefficient. /// Note that this is an uncached query, and thus may be inefficient.
/// ///
MemDepResult getPointerDependencyFrom(const AliasAnalysis::Location &Loc, MemDepResult getPointerDependencyFrom(const AliasAnalysis::Location &Loc,
bool isLoad, bool isLoad,
BasicBlock::iterator ScanIt, BasicBlock::iterator ScanIt,
BasicBlock *BB); BasicBlock *BB);
/// getLoadLoadClobberFullWidthSize - This is a little bit of analysis that /// getLoadLoadClobberFullWidthSize - This is a little bit of analysis that
/// looks at a memory location for a load (specified by MemLocBase, Offs, /// looks at a memory location for a load (specified by MemLocBase, Offs,
/// and Size) and compares it against a load. If the specified load could /// and Size) and compares it against a load. If the specified load could
@ -413,7 +413,7 @@ namespace llvm {
unsigned MemLocSize, unsigned MemLocSize,
const LoadInst *LI, const LoadInst *LI,
const DataLayout &TD); const DataLayout &TD);
private: private:
MemDepResult getCallSiteDependencyFrom(CallSite C, bool isReadOnlyCall, MemDepResult getCallSiteDependencyFrom(CallSite C, bool isReadOnlyCall,
BasicBlock::iterator ScanIt, BasicBlock::iterator ScanIt,
@ -430,11 +430,11 @@ namespace llvm {
unsigned NumSortedEntries); unsigned NumSortedEntries);
void RemoveCachedNonLocalPointerDependencies(ValueIsLoadPair P); void RemoveCachedNonLocalPointerDependencies(ValueIsLoadPair P);
/// verifyRemoved - Verify that the specified instruction does not occur /// verifyRemoved - Verify that the specified instruction does not occur
/// in our internal data structures. /// in our internal data structures.
void verifyRemoved(Instruction *Inst) const; void verifyRemoved(Instruction *Inst) const;
}; };
} // End llvm namespace } // End llvm namespace