mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 18:54:02 +01:00
Whitespace.
llvm-svn: 244431
This commit is contained in:
parent
b93b06ef3e
commit
c1197d9021
@ -1528,7 +1528,7 @@ public:
|
||||
/// \returns the nearest log base 2 of this APInt. Ties round up.
|
||||
///
|
||||
/// NOTE: When we have a BitWidth of 1, we define:
|
||||
///
|
||||
///
|
||||
/// log2(0) = UINT32_MAX
|
||||
/// log2(1) = 0
|
||||
///
|
||||
|
@ -286,7 +286,7 @@ public:
|
||||
}
|
||||
|
||||
/// \brief Determine if two APSInts have the same value, zero- or
|
||||
/// sign-extending as needed.
|
||||
/// sign-extending as needed.
|
||||
static bool isSameValue(const APSInt &I1, const APSInt &I2) {
|
||||
return !compareValues(I1, I2);
|
||||
}
|
||||
|
@ -68,7 +68,7 @@ private:
|
||||
/// \return - True on success.
|
||||
bool Search(const changeset_ty &Changes, const changesetlist_ty &Sets,
|
||||
changeset_ty &Res);
|
||||
|
||||
|
||||
protected:
|
||||
/// UpdatedSearchState - Callback used when the search state changes.
|
||||
virtual void UpdatedSearchState(const changeset_ty &Changes,
|
||||
|
@ -58,7 +58,7 @@ template<> struct DenseMapInfo<char> {
|
||||
return LHS == RHS;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
// Provide DenseMapInfo for unsigned ints.
|
||||
template<> struct DenseMapInfo<unsigned> {
|
||||
static inline unsigned getEmptyKey() { return ~0U; }
|
||||
|
@ -151,7 +151,7 @@ public:
|
||||
detail::DenseSetEmpty Empty;
|
||||
return TheMap.insert(std::make_pair(V, Empty));
|
||||
}
|
||||
|
||||
|
||||
// Range insertion of values.
|
||||
template<typename InputIt>
|
||||
void insert(InputIt I, InputIt E) {
|
||||
|
@ -80,16 +80,16 @@ class df_iterator : public std::iterator<std::forward_iterator_tag,
|
||||
private:
|
||||
inline df_iterator(NodeType *Node) {
|
||||
this->Visited.insert(Node);
|
||||
VisitStack.push_back(std::make_pair(PointerIntTy(Node, 0),
|
||||
VisitStack.push_back(std::make_pair(PointerIntTy(Node, 0),
|
||||
GT::child_begin(Node)));
|
||||
}
|
||||
inline df_iterator() {
|
||||
// End is when stack is empty
|
||||
inline df_iterator() {
|
||||
// End is when stack is empty
|
||||
}
|
||||
inline df_iterator(NodeType *Node, SetType &S)
|
||||
: df_iterator_storage<SetType, ExtStorage>(S) {
|
||||
if (!S.count(Node)) {
|
||||
VisitStack.push_back(std::make_pair(PointerIntTy(Node, 0),
|
||||
VisitStack.push_back(std::make_pair(PointerIntTy(Node, 0),
|
||||
GT::child_begin(Node)));
|
||||
this->Visited.insert(Node);
|
||||
}
|
||||
@ -115,7 +115,7 @@ private:
|
||||
// Has our next sibling been visited?
|
||||
if (Next && this->Visited.insert(Next).second) {
|
||||
// No, do it now.
|
||||
VisitStack.push_back(std::make_pair(PointerIntTy(Next, 0),
|
||||
VisitStack.push_back(std::make_pair(PointerIntTy(Next, 0),
|
||||
GT::child_begin(Next)));
|
||||
return;
|
||||
}
|
||||
|
@ -717,8 +717,8 @@ protected:
|
||||
explicit FastFoldingSetNode(const FoldingSetNodeID &ID) : FastID(ID) {}
|
||||
|
||||
public:
|
||||
void Profile(FoldingSetNodeID &ID) const {
|
||||
ID.AddNodeID(FastID);
|
||||
void Profile(FoldingSetNodeID &ID) const {
|
||||
ID.AddNodeID(FastID);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -100,7 +100,7 @@ public:
|
||||
public:
|
||||
Factory(bool canonicalize = true)
|
||||
: Canonicalize(canonicalize) {}
|
||||
|
||||
|
||||
Factory(BumpPtrAllocator& Alloc, bool canonicalize = true)
|
||||
: F(Alloc), Canonicalize(canonicalize) {}
|
||||
|
||||
@ -145,11 +145,11 @@ public:
|
||||
TreeTy *getRootWithoutRetain() const {
|
||||
return Root;
|
||||
}
|
||||
|
||||
|
||||
void manualRetain() {
|
||||
if (Root) Root->retain();
|
||||
}
|
||||
|
||||
|
||||
void manualRelease() {
|
||||
if (Root) Root->release();
|
||||
}
|
||||
@ -223,7 +223,7 @@ public:
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
/// getMaxElement - Returns the <key,value> pair in the ImmutableMap for
|
||||
/// which key is the highest in the ordering of keys in the map. This
|
||||
/// method returns NULL if the map is empty.
|
||||
@ -259,17 +259,17 @@ public:
|
||||
typedef typename ValInfo::data_type_ref data_type_ref;
|
||||
typedef ImutAVLTree<ValInfo> TreeTy;
|
||||
typedef typename TreeTy::Factory FactoryTy;
|
||||
|
||||
|
||||
protected:
|
||||
TreeTy *Root;
|
||||
FactoryTy *Factory;
|
||||
|
||||
|
||||
public:
|
||||
/// Constructs a map from a pointer to a tree root. In general one
|
||||
/// should use a Factory object to create maps instead of directly
|
||||
/// invoking the constructor, but there are cases where make this
|
||||
/// constructor public is useful.
|
||||
explicit ImmutableMapRef(const TreeTy* R, FactoryTy *F)
|
||||
explicit ImmutableMapRef(const TreeTy* R, FactoryTy *F)
|
||||
: Root(const_cast<TreeTy*>(R)),
|
||||
Factory(F) {
|
||||
if (Root) { Root->retain(); }
|
||||
@ -281,7 +281,7 @@ public:
|
||||
Factory(F.getTreeFactory()) {
|
||||
if (Root) { Root->retain(); }
|
||||
}
|
||||
|
||||
|
||||
ImmutableMapRef(const ImmutableMapRef &X)
|
||||
: Root(X.Root),
|
||||
Factory(X.Factory) {
|
||||
@ -292,10 +292,10 @@ public:
|
||||
if (Root != X.Root) {
|
||||
if (X.Root)
|
||||
X.Root->retain();
|
||||
|
||||
|
||||
if (Root)
|
||||
Root->release();
|
||||
|
||||
|
||||
Root = X.Root;
|
||||
Factory = X.Factory;
|
||||
}
|
||||
@ -306,7 +306,7 @@ public:
|
||||
if (Root)
|
||||
Root->release();
|
||||
}
|
||||
|
||||
|
||||
static inline ImmutableMapRef getEmptyMap(FactoryTy *F) {
|
||||
return ImmutableMapRef(0, F);
|
||||
}
|
||||
@ -328,31 +328,31 @@ public:
|
||||
TreeTy *NewT = Factory->remove(Root, K);
|
||||
return ImmutableMapRef(NewT, Factory);
|
||||
}
|
||||
|
||||
|
||||
bool contains(key_type_ref K) const {
|
||||
return Root ? Root->contains(K) : false;
|
||||
}
|
||||
|
||||
|
||||
ImmutableMap<KeyT, ValT> asImmutableMap() const {
|
||||
return ImmutableMap<KeyT, ValT>(Factory->getCanonicalTree(Root));
|
||||
}
|
||||
|
||||
|
||||
bool operator==(const ImmutableMapRef &RHS) const {
|
||||
return Root && RHS.Root ? Root->isEqual(*RHS.Root) : Root == RHS.Root;
|
||||
}
|
||||
|
||||
|
||||
bool operator!=(const ImmutableMapRef &RHS) const {
|
||||
return Root && RHS.Root ? Root->isNotEqual(*RHS.Root) : Root != RHS.Root;
|
||||
}
|
||||
|
||||
|
||||
bool isEmpty() const { return !Root; }
|
||||
|
||||
|
||||
//===--------------------------------------------------===//
|
||||
// For testing.
|
||||
//===--------------------------------------------------===//
|
||||
|
||||
|
||||
void verify() const { if (Root) Root->verify(); }
|
||||
|
||||
|
||||
//===--------------------------------------------------===//
|
||||
// Iterators.
|
||||
//===--------------------------------------------------===//
|
||||
@ -369,38 +369,38 @@ public:
|
||||
|
||||
iterator begin() const { return iterator(Root); }
|
||||
iterator end() const { return iterator(); }
|
||||
|
||||
|
||||
data_type* lookup(key_type_ref K) const {
|
||||
if (Root) {
|
||||
TreeTy* T = Root->find(K);
|
||||
if (T) return &T->getValue().second;
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/// getMaxElement - Returns the <key,value> pair in the ImmutableMap for
|
||||
/// which key is the highest in the ordering of keys in the map. This
|
||||
/// method returns NULL if the map is empty.
|
||||
value_type* getMaxElement() const {
|
||||
return Root ? &(Root->getMaxElement()->getValue()) : 0;
|
||||
}
|
||||
|
||||
|
||||
//===--------------------------------------------------===//
|
||||
// Utility methods.
|
||||
//===--------------------------------------------------===//
|
||||
|
||||
|
||||
unsigned getHeight() const { return Root ? Root->getHeight() : 0; }
|
||||
|
||||
|
||||
static inline void Profile(FoldingSetNodeID& ID, const ImmutableMapRef &M) {
|
||||
ID.AddPointer(M.Root);
|
||||
}
|
||||
|
||||
|
||||
inline void Profile(FoldingSetNodeID& ID) const {
|
||||
return Profile(ID, *this);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
} // end namespace llvm
|
||||
|
||||
#endif
|
||||
|
@ -83,9 +83,9 @@ public:
|
||||
PackedVector &Vec;
|
||||
const unsigned Idx;
|
||||
|
||||
reference(); // Undefined
|
||||
reference(); // Undefined
|
||||
public:
|
||||
reference(PackedVector &vec, unsigned idx) : Vec(vec), Idx(idx) { }
|
||||
reference(PackedVector &vec, unsigned idx) : Vec(vec), Idx(idx) { }
|
||||
|
||||
reference &operator=(T val) {
|
||||
Vec.setValue(Vec.Bits, Idx, val);
|
||||
@ -102,9 +102,9 @@ public:
|
||||
bool empty() const { return Bits.empty(); }
|
||||
|
||||
unsigned size() const { return Bits.size() >> (BitNum-1); }
|
||||
|
||||
|
||||
void clear() { Bits.clear(); }
|
||||
|
||||
|
||||
void resize(unsigned N) { Bits.resize(N << (BitNum-1)); }
|
||||
|
||||
void reserve(unsigned N) { Bits.reserve(N << (BitNum-1)); }
|
||||
@ -150,7 +150,7 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
// Leave BitNum=0 undefined.
|
||||
// Leave BitNum=0 undefined.
|
||||
template <typename T>
|
||||
class PackedVector<T, 0>;
|
||||
|
||||
|
@ -55,10 +55,10 @@ class PointerIntPair {
|
||||
/// IntShift - The number of low bits that we reserve for other uses, and
|
||||
/// keep zero.
|
||||
IntShift = (uintptr_t)PtrTraits::NumLowBitsAvailable-IntBits,
|
||||
|
||||
|
||||
/// IntMask - This is the unshifted mask for valid bits of the int type.
|
||||
IntMask = (uintptr_t)(((intptr_t)1 << IntBits)-1),
|
||||
|
||||
|
||||
// ShiftedIntMask - This is the bits for the integer shifted in place.
|
||||
ShiftedIntMask = (uintptr_t)(IntMask << IntShift)
|
||||
};
|
||||
@ -93,7 +93,7 @@ public:
|
||||
void setInt(IntType IntVal) {
|
||||
intptr_t IntWord = static_cast<intptr_t>(IntVal);
|
||||
assert((IntWord & ~IntMask) == 0 && "Integer too large for field");
|
||||
|
||||
|
||||
// Preserve all bits other than the ones we are updating.
|
||||
Value &= ~ShiftedIntMask; // Remove integer field.
|
||||
Value |= IntWord << IntShift; // Set new integer.
|
||||
@ -133,7 +133,7 @@ public:
|
||||
void setFromOpaqueValue(void *Val) { Value = reinterpret_cast<intptr_t>(Val);}
|
||||
|
||||
static PointerIntPair getFromOpaqueValue(void *V) {
|
||||
PointerIntPair P; P.setFromOpaqueValue(V); return P;
|
||||
PointerIntPair P; P.setFromOpaqueValue(V); return P;
|
||||
}
|
||||
|
||||
// Allow PointerIntPairs to be created from const void * if and only if the
|
||||
@ -156,7 +156,7 @@ template<typename PointerTy, unsigned IntBits, typename IntType>
|
||||
struct isPodLike<PointerIntPair<PointerTy, IntBits, IntType> > {
|
||||
static const bool value = true;
|
||||
};
|
||||
|
||||
|
||||
// Provide specialization of DenseMapInfo for PointerIntPair.
|
||||
template<typename PointerTy, unsigned IntBits, typename IntType>
|
||||
struct DenseMapInfo<PointerIntPair<PointerTy, IntBits, IntType> > {
|
||||
|
@ -56,7 +56,7 @@ public:
|
||||
ScopedHashTableVal *getNextForKey() { return NextForKey; }
|
||||
const ScopedHashTableVal *getNextForKey() const { return NextForKey; }
|
||||
ScopedHashTableVal *getNextInScope() { return NextInScope; }
|
||||
|
||||
|
||||
template <typename AllocatorTy>
|
||||
static ScopedHashTableVal *Create(ScopedHashTableVal *nextInScope,
|
||||
ScopedHashTableVal *nextForKey,
|
||||
@ -66,10 +66,10 @@ public:
|
||||
// Set up the value.
|
||||
new (New) ScopedHashTableVal(key, val);
|
||||
New->NextInScope = nextInScope;
|
||||
New->NextForKey = nextForKey;
|
||||
New->NextForKey = nextForKey;
|
||||
return New;
|
||||
}
|
||||
|
||||
|
||||
template <typename AllocatorTy>
|
||||
void Destroy(AllocatorTy &Allocator) {
|
||||
// Free memory referenced by the item.
|
||||
@ -99,7 +99,7 @@ public:
|
||||
|
||||
ScopedHashTableScope *getParentScope() { return PrevScope; }
|
||||
const ScopedHashTableScope *getParentScope() const { return PrevScope; }
|
||||
|
||||
|
||||
private:
|
||||
friend class ScopedHashTable<K, V, KInfo, AllocatorTy>;
|
||||
ScopedHashTableVal<K, V> *getLastValInScope() {
|
||||
@ -154,9 +154,9 @@ private:
|
||||
typedef ScopedHashTableVal<K, V> ValTy;
|
||||
DenseMap<K, ValTy*, KInfo> TopLevelMap;
|
||||
ScopeTy *CurScope;
|
||||
|
||||
|
||||
AllocatorTy Allocator;
|
||||
|
||||
|
||||
ScopedHashTable(const ScopedHashTable&); // NOT YET IMPLEMENTED
|
||||
void operator=(const ScopedHashTable&); // NOT YET IMPLEMENTED
|
||||
friend class ScopedHashTableScope<K, V, KInfo, AllocatorTy>;
|
||||
@ -181,7 +181,7 @@ public:
|
||||
typename DenseMap<K, ValTy*, KInfo>::iterator I = TopLevelMap.find(Key);
|
||||
if (I != TopLevelMap.end())
|
||||
return I->second->getValue();
|
||||
|
||||
|
||||
return V();
|
||||
}
|
||||
|
||||
@ -199,7 +199,7 @@ public:
|
||||
if (I == TopLevelMap.end()) return end();
|
||||
return iterator(I->second);
|
||||
}
|
||||
|
||||
|
||||
ScopeTy *getCurScope() { return CurScope; }
|
||||
const ScopeTy *getCurScope() const { return CurScope; }
|
||||
|
||||
|
@ -190,7 +190,7 @@ public:
|
||||
set_.erase(back());
|
||||
vector_.pop_back();
|
||||
}
|
||||
|
||||
|
||||
T LLVM_ATTRIBUTE_UNUSED_RESULT pop_back_val() {
|
||||
T Ret = back();
|
||||
pop_back();
|
||||
|
@ -181,14 +181,14 @@ protected:
|
||||
template<typename PtrTy>
|
||||
class SmallPtrSetIterator : public SmallPtrSetIteratorImpl {
|
||||
typedef PointerLikeTypeTraits<PtrTy> PtrTraits;
|
||||
|
||||
|
||||
public:
|
||||
typedef PtrTy value_type;
|
||||
typedef PtrTy reference;
|
||||
typedef PtrTy pointer;
|
||||
typedef std::ptrdiff_t difference_type;
|
||||
typedef std::forward_iterator_tag iterator_category;
|
||||
|
||||
|
||||
explicit SmallPtrSetIterator(const void *const *BP, const void *const *E)
|
||||
: SmallPtrSetIteratorImpl(BP, E) {}
|
||||
|
||||
|
@ -93,7 +93,7 @@ public:
|
||||
for (; I != E; ++I)
|
||||
insert(*I);
|
||||
}
|
||||
|
||||
|
||||
bool erase(const T &V) {
|
||||
if (!isSmall())
|
||||
return Set.erase(V);
|
||||
|
@ -220,7 +220,7 @@ class StringMap : public StringMapImpl {
|
||||
|
||||
public:
|
||||
typedef StringMapEntry<ValueTy> MapEntryTy;
|
||||
|
||||
|
||||
StringMap() : StringMapImpl(static_cast<unsigned>(sizeof(MapEntryTy))) {}
|
||||
explicit StringMap(unsigned InitialSize)
|
||||
: StringMapImpl(InitialSize, static_cast<unsigned>(sizeof(MapEntryTy))) {}
|
||||
|
@ -15,7 +15,7 @@
|
||||
#include "llvm/ADT/SmallVector.h"
|
||||
|
||||
namespace llvm {
|
||||
|
||||
|
||||
/// TinyPtrVector - This class is specialized for cases where there are
|
||||
/// normally 0 or 1 element in a vector, but is general enough to go beyond that
|
||||
/// when required.
|
||||
|
@ -111,7 +111,7 @@ protected:
|
||||
|
||||
public:
|
||||
bool cleanupFired;
|
||||
|
||||
|
||||
virtual ~CrashRecoveryContextCleanup();
|
||||
virtual void recoverResources() = 0;
|
||||
|
||||
@ -146,7 +146,7 @@ class CrashRecoveryContextDestructorCleanup : public
|
||||
CrashRecoveryContextCleanupBase<CrashRecoveryContextDestructorCleanup<T>, T> {
|
||||
public:
|
||||
CrashRecoveryContextDestructorCleanup(CrashRecoveryContext *context,
|
||||
T *resource)
|
||||
T *resource)
|
||||
: CrashRecoveryContextCleanupBase<
|
||||
CrashRecoveryContextDestructorCleanup<T>, T>(context, resource) {}
|
||||
|
||||
@ -171,7 +171,7 @@ class CrashRecoveryContextReleaseRefCleanup : public
|
||||
CrashRecoveryContextCleanupBase<CrashRecoveryContextReleaseRefCleanup<T>, T>
|
||||
{
|
||||
public:
|
||||
CrashRecoveryContextReleaseRefCleanup(CrashRecoveryContext *context,
|
||||
CrashRecoveryContextReleaseRefCleanup(CrashRecoveryContext *context,
|
||||
T *resource)
|
||||
: CrashRecoveryContextCleanupBase<CrashRecoveryContextReleaseRefCleanup<T>,
|
||||
T>(context, resource) {}
|
||||
@ -193,7 +193,7 @@ public:
|
||||
~CrashRecoveryContextCleanupRegistrar() {
|
||||
unregister();
|
||||
}
|
||||
|
||||
|
||||
void unregister() {
|
||||
if (cleanup && !cleanup->cleanupFired)
|
||||
cleanup->getContext()->unregisterCleanup(cleanup);
|
||||
|
@ -610,7 +610,7 @@ unsigned getAttributeEncoding(StringRef EncodingString);
|
||||
const char *AttributeValueString(uint16_t Attr, unsigned Val);
|
||||
|
||||
/// \brief Decsribes an entry of the various gnu_pub* debug sections.
|
||||
///
|
||||
///
|
||||
/// The gnu_pub* kind looks like:
|
||||
///
|
||||
/// 0-3 reserved
|
||||
|
@ -67,7 +67,7 @@ namespace llvm {
|
||||
///
|
||||
/// If no error handler is installed the default is to print the message to
|
||||
/// standard error, followed by a newline.
|
||||
/// After the error handler is called this function will call exit(1), it
|
||||
/// After the error handler is called this function will call exit(1), it
|
||||
/// does not return.
|
||||
LLVM_ATTRIBUTE_NORETURN void report_fatal_error(const char *reason,
|
||||
bool gen_crash_diag = true);
|
||||
|
@ -97,19 +97,19 @@ enum perms {
|
||||
// Helper functions so that you can use & and | to manipulate perms bits:
|
||||
inline perms operator|(perms l , perms r) {
|
||||
return static_cast<perms>(
|
||||
static_cast<unsigned short>(l) | static_cast<unsigned short>(r));
|
||||
static_cast<unsigned short>(l) | static_cast<unsigned short>(r));
|
||||
}
|
||||
inline perms operator&(perms l , perms r) {
|
||||
return static_cast<perms>(
|
||||
static_cast<unsigned short>(l) & static_cast<unsigned short>(r));
|
||||
static_cast<unsigned short>(l) & static_cast<unsigned short>(r));
|
||||
}
|
||||
inline perms &operator|=(perms &l, perms r) {
|
||||
l = l | r;
|
||||
return l;
|
||||
l = l | r;
|
||||
return l;
|
||||
}
|
||||
inline perms &operator&=(perms &l, perms r) {
|
||||
l = l & r;
|
||||
return l;
|
||||
l = l & r;
|
||||
return l;
|
||||
}
|
||||
inline perms operator~(perms x) {
|
||||
return static_cast<perms>(~static_cast<unsigned short>(x));
|
||||
|
@ -180,7 +180,7 @@ inline FormattedNumber format_hex_no_prefix(uint64_t N, unsigned Width,
|
||||
return FormattedNumber(N, 0, Width, true, Upper, false);
|
||||
}
|
||||
|
||||
/// format_decimal - Output \p N as a right justified, fixed-width decimal. If
|
||||
/// format_decimal - Output \p N as a right justified, fixed-width decimal. If
|
||||
/// number will not fit in width, full number is still printed. Examples:
|
||||
/// OS << format_decimal(0, 5) => " 0"
|
||||
/// OS << format_decimal(255, 5) => " 255"
|
||||
|
@ -87,7 +87,7 @@ unsigned DFSPass(DominatorTreeBase<typename GraphT::NodeType>& DT,
|
||||
|
||||
// Increment the successor number for the next time we get to it.
|
||||
++Worklist.back().second;
|
||||
|
||||
|
||||
// Visit the successor next, if it isn't already visited.
|
||||
typename GraphT::NodeType* Succ = *NextSucc;
|
||||
|
||||
@ -103,7 +103,7 @@ unsigned DFSPass(DominatorTreeBase<typename GraphT::NodeType>& DT,
|
||||
}
|
||||
|
||||
template<class GraphT>
|
||||
typename GraphT::NodeType*
|
||||
typename GraphT::NodeType*
|
||||
Eval(DominatorTreeBase<typename GraphT::NodeType>& DT,
|
||||
typename GraphT::NodeType *VIn, unsigned LastLinked) {
|
||||
typename DominatorTreeBase<typename GraphT::NodeType>::InfoRec &VInInfo =
|
||||
@ -116,7 +116,7 @@ Eval(DominatorTreeBase<typename GraphT::NodeType>& DT,
|
||||
|
||||
if (VInInfo.Parent >= LastLinked)
|
||||
Work.push_back(VIn);
|
||||
|
||||
|
||||
while (!Work.empty()) {
|
||||
typename GraphT::NodeType* V = Work.back();
|
||||
typename DominatorTreeBase<typename GraphT::NodeType>::InfoRec &VInfo =
|
||||
@ -127,8 +127,8 @@ Eval(DominatorTreeBase<typename GraphT::NodeType>& DT,
|
||||
if (Visited.insert(VAncestor).second && VInfo.Parent >= LastLinked) {
|
||||
Work.push_back(VAncestor);
|
||||
continue;
|
||||
}
|
||||
Work.pop_back();
|
||||
}
|
||||
Work.pop_back();
|
||||
|
||||
// Update VInfo based on Ancestor info
|
||||
if (VInfo.Parent < LastLinked)
|
||||
@ -168,7 +168,7 @@ void Calculate(DominatorTreeBase<typename GraphTraits<NodeT>::NodeType>& DT,
|
||||
i != e; ++i)
|
||||
N = DFSPass<GraphT>(DT, DT.Roots[i], N);
|
||||
|
||||
// it might be that some blocks did not get a DFS number (e.g., blocks of
|
||||
// it might be that some blocks did not get a DFS number (e.g., blocks of
|
||||
// infinite loops). In these cases an artificial exit node is required.
|
||||
MultipleRoots |= (DT.isPostDominator() && N != GraphTraits<FuncT*>::size(&F));
|
||||
|
||||
|
@ -383,7 +383,7 @@ namespace llvm {
|
||||
SELF_LIBRARY_ORDINAL = 0x0,
|
||||
MAX_LIBRARY_ORDINAL = 0xfd,
|
||||
DYNAMIC_LOOKUP_ORDINAL = 0xfe,
|
||||
EXECUTABLE_ORDINAL = 0xff
|
||||
EXECUTABLE_ORDINAL = 0xff
|
||||
};
|
||||
|
||||
enum StabType {
|
||||
|
@ -552,7 +552,7 @@ inline uint32_t FloatToBits(float Float) {
|
||||
inline uint64_t MinAlign(uint64_t A, uint64_t B) {
|
||||
// The largest power of 2 that divides both A and B.
|
||||
//
|
||||
// Replace "-Value" by "1+~Value" in the following commented code to avoid
|
||||
// Replace "-Value" by "1+~Value" in the following commented code to avoid
|
||||
// MSVC warning C4146
|
||||
// return (A | B) & -(A | B);
|
||||
return (A | B) & (1 + ~(A | B));
|
||||
|
@ -71,7 +71,7 @@ namespace sys {
|
||||
/// If the address following \p NearBlock is not so aligned, it will be
|
||||
/// rounded up to the next allocation granularity boundary.
|
||||
///
|
||||
/// \r a non-null MemoryBlock if the function was successful,
|
||||
/// \r a non-null MemoryBlock if the function was successful,
|
||||
/// otherwise a null MemoryBlock is with \p EC describing the error.
|
||||
///
|
||||
/// @brief Allocate mapped memory.
|
||||
@ -87,7 +87,7 @@ namespace sys {
|
||||
///
|
||||
/// \r error_success if the function was successful, or an error_code
|
||||
/// describing the failure if an error occurred.
|
||||
///
|
||||
///
|
||||
/// @brief Release mapped memory.
|
||||
static std::error_code releaseMappedMemory(MemoryBlock &Block);
|
||||
|
||||
|
@ -216,7 +216,7 @@ StringRef root_name(StringRef path);
|
||||
/// @result The root directory of \a path if it has one, otherwise
|
||||
/// "".
|
||||
StringRef root_directory(StringRef path);
|
||||
|
||||
|
||||
/// @brief Get root path.
|
||||
///
|
||||
/// Equivalent to root_name + root_directory.
|
||||
@ -308,7 +308,7 @@ bool is_separator(char value);
|
||||
/// @result StringRef of the preferred separator, null-terminated.
|
||||
StringRef get_separator();
|
||||
|
||||
/// @brief Get the typical temporary directory for the system, e.g.,
|
||||
/// @brief Get the typical temporary directory for the system, e.g.,
|
||||
/// "/var/tmp" or "C:/TEMP"
|
||||
///
|
||||
/// @param erasedOnReboot Whether to favor a path that is erased on reboot
|
||||
|
@ -18,7 +18,7 @@
|
||||
#include "llvm/Support/DataTypes.h"
|
||||
|
||||
namespace llvm {
|
||||
|
||||
|
||||
/// PointerLikeTypeTraits - This is a traits object that is used to handle
|
||||
/// pointer types and things that are just wrappers for pointers as a uniform
|
||||
/// entity.
|
||||
@ -37,7 +37,7 @@ public:
|
||||
static inline T *getFromVoidPointer(void *P) {
|
||||
return static_cast<T*>(P);
|
||||
}
|
||||
|
||||
|
||||
/// Note, we assume here that malloc returns objects at least 4-byte aligned.
|
||||
/// However, this may be wrong, or pointers may be from something other than
|
||||
/// malloc. In this case, you should specialize this template to reduce this.
|
||||
@ -46,7 +46,7 @@ public:
|
||||
/// this is actually true.
|
||||
enum { NumLowBitsAvailable = 2 };
|
||||
};
|
||||
|
||||
|
||||
// Provide PointerLikeTypeTraits for const pointers.
|
||||
template<typename T>
|
||||
class PointerLikeTypeTraits<const T*> {
|
||||
@ -75,7 +75,7 @@ public:
|
||||
// No bits are available!
|
||||
enum { NumLowBitsAvailable = 0 };
|
||||
};
|
||||
|
||||
|
||||
} // end namespace llvm
|
||||
|
||||
#endif
|
||||
|
@ -54,10 +54,10 @@ public:
|
||||
assert(Start.isValid() == End.isValid() &&
|
||||
"Start and end should either both be valid or both be invalid!");
|
||||
}
|
||||
|
||||
|
||||
bool isValid() const { return Start.isValid(); }
|
||||
};
|
||||
|
||||
|
||||
} // end namespace llvm
|
||||
|
||||
#endif
|
||||
|
@ -25,11 +25,11 @@ extern "C" {
|
||||
|
||||
#define LLVM_TARGET(TargetName) void LLVMInitialize##TargetName##Target();
|
||||
#include "llvm/Config/Targets.def"
|
||||
|
||||
|
||||
// Declare all of the target-MC-initialization functions that are available.
|
||||
#define LLVM_TARGET(TargetName) void LLVMInitialize##TargetName##TargetMC();
|
||||
#include "llvm/Config/Targets.def"
|
||||
|
||||
|
||||
// Declare all of the available assembly printer initialization functions.
|
||||
#define LLVM_ASM_PRINTER(TargetName) void LLVMInitialize##TargetName##AsmPrinter();
|
||||
#include "llvm/Config/AsmPrinters.def"
|
||||
@ -54,7 +54,7 @@ namespace llvm {
|
||||
#define LLVM_TARGET(TargetName) LLVMInitialize##TargetName##TargetInfo();
|
||||
#include "llvm/Config/Targets.def"
|
||||
}
|
||||
|
||||
|
||||
/// InitializeAllTargets - The main program should call this function if it
|
||||
/// wants access to all available target machines that LLVM is configured to
|
||||
/// support, to make them available via the TargetRegistry.
|
||||
@ -67,7 +67,7 @@ namespace llvm {
|
||||
#define LLVM_TARGET(TargetName) LLVMInitialize##TargetName##Target();
|
||||
#include "llvm/Config/Targets.def"
|
||||
}
|
||||
|
||||
|
||||
/// InitializeAllTargetMCs - The main program should call this function if it
|
||||
/// wants access to all available target MC that LLVM is configured to
|
||||
/// support, to make them available via the TargetRegistry.
|
||||
@ -77,7 +77,7 @@ namespace llvm {
|
||||
#define LLVM_TARGET(TargetName) LLVMInitialize##TargetName##TargetMC();
|
||||
#include "llvm/Config/Targets.def"
|
||||
}
|
||||
|
||||
|
||||
/// InitializeAllAsmPrinters - The main program should call this function if
|
||||
/// it wants all asm printers that LLVM is configured to support, to make them
|
||||
/// available via the TargetRegistry.
|
||||
@ -87,7 +87,7 @@ namespace llvm {
|
||||
#define LLVM_ASM_PRINTER(TargetName) LLVMInitialize##TargetName##AsmPrinter();
|
||||
#include "llvm/Config/AsmPrinters.def"
|
||||
}
|
||||
|
||||
|
||||
/// InitializeAllAsmParsers - The main program should call this function if it
|
||||
/// wants all asm parsers that LLVM is configured to support, to make them
|
||||
/// available via the TargetRegistry.
|
||||
@ -97,7 +97,7 @@ namespace llvm {
|
||||
#define LLVM_ASM_PARSER(TargetName) LLVMInitialize##TargetName##AsmParser();
|
||||
#include "llvm/Config/AsmParsers.def"
|
||||
}
|
||||
|
||||
|
||||
/// InitializeAllDisassemblers - The main program should call this function if
|
||||
/// it wants all disassemblers that LLVM is configured to support, to make
|
||||
/// them available via the TargetRegistry.
|
||||
@ -107,9 +107,9 @@ namespace llvm {
|
||||
#define LLVM_DISASSEMBLER(TargetName) LLVMInitialize##TargetName##Disassembler();
|
||||
#include "llvm/Config/Disassemblers.def"
|
||||
}
|
||||
|
||||
|
||||
/// InitializeNativeTarget - The main program should call this function to
|
||||
/// initialize the native target corresponding to the host. This is useful
|
||||
/// initialize the native target corresponding to the host. This is useful
|
||||
/// for JIT applications to ensure that the target gets linked in correctly.
|
||||
///
|
||||
/// It is legal for a client to make multiple calls to this function.
|
||||
@ -123,7 +123,7 @@ namespace llvm {
|
||||
#else
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
/// InitializeNativeTargetAsmPrinter - The main program should call
|
||||
/// this function to initialize the native target asm printer.
|
||||
@ -135,7 +135,7 @@ namespace llvm {
|
||||
#else
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
/// InitializeNativeTargetAsmParser - The main program should call
|
||||
/// this function to initialize the native target asm parser.
|
||||
@ -147,7 +147,7 @@ namespace llvm {
|
||||
#else
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
/// InitializeNativeTargetDisassembler - The main program should call
|
||||
/// this function to initialize the native target disassembler.
|
||||
|
@ -21,7 +21,7 @@ namespace llvm {
|
||||
bool llvm_is_multithreaded();
|
||||
|
||||
/// llvm_execute_on_thread - Execute the given \p UserFn on a separate
|
||||
/// thread, passing it the provided \p UserData and waits for thread
|
||||
/// thread, passing it the provided \p UserData and waits for thread
|
||||
/// completion.
|
||||
///
|
||||
/// This function does not guarantee that the code will actually be executed
|
||||
|
@ -30,13 +30,13 @@ class TimeRecord {
|
||||
ssize_t MemUsed; // Memory allocated (in bytes)
|
||||
public:
|
||||
TimeRecord() : WallTime(0), UserTime(0), SystemTime(0), MemUsed(0) {}
|
||||
|
||||
|
||||
/// getCurrentTime - Get the current time and memory usage. If Start is true
|
||||
/// we get the memory usage before the time, otherwise we get time before
|
||||
/// memory usage. This matters if the time to get the memory usage is
|
||||
/// significant and shouldn't be counted as part of a duration.
|
||||
static TimeRecord getCurrentTime(bool Start = true);
|
||||
|
||||
|
||||
double getProcessTime() const { return UserTime+SystemTime; }
|
||||
double getUserTime() const { return UserTime; }
|
||||
double getSystemTime() const { return SystemTime; }
|
||||
@ -48,7 +48,7 @@ public:
|
||||
// Sort by Wall Time elapsed, as it is the only thing really accurate
|
||||
return WallTime < T.WallTime;
|
||||
}
|
||||
|
||||
|
||||
void operator+=(const TimeRecord &RHS) {
|
||||
WallTime += RHS.WallTime;
|
||||
UserTime += RHS.UserTime;
|
||||
@ -61,12 +61,12 @@ public:
|
||||
SystemTime -= RHS.SystemTime;
|
||||
MemUsed -= RHS.MemUsed;
|
||||
}
|
||||
|
||||
|
||||
/// print - Print the current timer to standard error, and reset the "Started"
|
||||
/// flag.
|
||||
void print(const TimeRecord &Total, raw_ostream &OS) const;
|
||||
};
|
||||
|
||||
|
||||
/// Timer - This class is used to track the amount of time spent between
|
||||
/// invocations of its startTimer()/stopTimer() methods. Given appropriate OS
|
||||
/// support it can also keep track of the RSS of the program at various points.
|
||||
@ -80,7 +80,7 @@ class Timer {
|
||||
std::string Name; // The name of this time variable.
|
||||
bool Started; // Has this time variable ever been started?
|
||||
TimerGroup *TG; // The TimerGroup this Timer is in.
|
||||
|
||||
|
||||
Timer **Prev, *Next; // Doubly linked list of timers in the group.
|
||||
public:
|
||||
explicit Timer(StringRef N) : TG(nullptr) { init(N); }
|
||||
@ -98,10 +98,10 @@ public:
|
||||
explicit Timer() : TG(nullptr) {}
|
||||
void init(StringRef N);
|
||||
void init(StringRef N, TimerGroup &tg);
|
||||
|
||||
|
||||
const std::string &getName() const { return Name; }
|
||||
bool isInitialized() const { return TG != nullptr; }
|
||||
|
||||
|
||||
/// startTimer - Start the timer running. Time between calls to
|
||||
/// startTimer/stopTimer is counted by the Timer class. Note that these calls
|
||||
/// must be correctly paired.
|
||||
@ -158,7 +158,7 @@ class TimerGroup {
|
||||
std::string Name;
|
||||
Timer *FirstTimer; // First timer in the group.
|
||||
std::vector<std::pair<TimeRecord, std::string> > TimersToPrint;
|
||||
|
||||
|
||||
TimerGroup **Prev, *Next; // Doubly linked list of TimerGroup's.
|
||||
TimerGroup(const TimerGroup &TG) = delete;
|
||||
void operator=(const TimerGroup &TG) = delete;
|
||||
@ -171,10 +171,10 @@ public:
|
||||
|
||||
/// print - Print any started timers in this group and zero them.
|
||||
void print(raw_ostream &OS);
|
||||
|
||||
|
||||
/// printAll - This static method prints all timers and clears them all out.
|
||||
static void printAll(raw_ostream &OS);
|
||||
|
||||
|
||||
private:
|
||||
friend class Timer;
|
||||
void addTimer(Timer &T);
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
#include "llvm/Support/raw_ostream.h"
|
||||
|
||||
namespace llvm
|
||||
namespace llvm
|
||||
{
|
||||
/// circular_raw_ostream - A raw_ostream which *can* save its data
|
||||
/// to a circular buffer, or can pass it through directly to an
|
||||
|
@ -218,10 +218,10 @@ public:
|
||||
|
||||
// Formatted output, see the leftJustify() function in Support/Format.h.
|
||||
raw_ostream &operator<<(const FormattedString &);
|
||||
|
||||
|
||||
// Formatted output, see the formatHex() function in Support/Format.h.
|
||||
raw_ostream &operator<<(const FormattedNumber &);
|
||||
|
||||
|
||||
/// indent - Insert 'NumSpaces' spaces.
|
||||
raw_ostream &indent(unsigned NumSpaces);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user