mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-10-11 07:24:06 +00:00
Convert tabs to spaces
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21436 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
59f6449cff
commit
3b1b6e626e
@ -38,8 +38,8 @@ class po_iterator : public forward_iterator<typename GT::NodeType, ptrdiff_t> {
|
|||||||
while (VisitStack.top().second != GT::child_end(VisitStack.top().first)) {
|
while (VisitStack.top().second != GT::child_end(VisitStack.top().first)) {
|
||||||
NodeType *BB = *VisitStack.top().second++;
|
NodeType *BB = *VisitStack.top().second++;
|
||||||
if (!Visited.count(BB)) { // If the block is not visited...
|
if (!Visited.count(BB)) { // If the block is not visited...
|
||||||
Visited.insert(BB);
|
Visited.insert(BB);
|
||||||
VisitStack.push(std::make_pair(BB, GT::child_begin(BB)));
|
VisitStack.push(std::make_pair(BB, GT::child_begin(BB)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -32,7 +32,7 @@ class constant_iterator : public forward_iterator<const Constant, ptrdiff_t> {
|
|||||||
|
|
||||||
inline bool isAtConstant() const {
|
inline bool isAtConstant() const {
|
||||||
assert(!InstI.atEnd() && OpIdx < InstI->getNumOperands() &&
|
assert(!InstI.atEnd() && OpIdx < InstI->getNumOperands() &&
|
||||||
"isAtConstant called with invalid arguments!");
|
"isAtConstant called with invalid arguments!");
|
||||||
return isa<Constant>(InstI->getOperand(OpIdx));
|
return isa<Constant>(InstI->getOperand(OpIdx));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -40,7 +40,7 @@ public:
|
|||||||
inline constant_iterator(const Function *F) : InstI(inst_begin(F)), OpIdx(0) {
|
inline constant_iterator(const Function *F) : InstI(inst_begin(F)), OpIdx(0) {
|
||||||
// Advance to first constant... if we are not already at constant or end
|
// Advance to first constant... if we are not already at constant or end
|
||||||
if (InstI != inst_end(F) && // InstI is valid?
|
if (InstI != inst_end(F) && // InstI is valid?
|
||||||
(InstI->getNumOperands() == 0 || !isAtConstant())) // Not at constant?
|
(InstI->getNumOperands() == 0 || !isAtConstant())) // Not at constant?
|
||||||
operator++();
|
operator++();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -49,7 +49,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
inline bool operator==(const _Self& x) const { return OpIdx == x.OpIdx &&
|
inline bool operator==(const _Self& x) const { return OpIdx == x.OpIdx &&
|
||||||
InstI == x.InstI; }
|
InstI == x.InstI; }
|
||||||
inline bool operator!=(const _Self& x) const { return !operator==(x); }
|
inline bool operator!=(const _Self& x) const { return !operator==(x); }
|
||||||
|
|
||||||
inline pointer operator*() const {
|
inline pointer operator*() const {
|
||||||
@ -63,7 +63,7 @@ public:
|
|||||||
do {
|
do {
|
||||||
unsigned NumOperands = InstI->getNumOperands();
|
unsigned NumOperands = InstI->getNumOperands();
|
||||||
while (OpIdx < NumOperands && !isAtConstant()) {
|
while (OpIdx < NumOperands && !isAtConstant()) {
|
||||||
++OpIdx;
|
++OpIdx;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (OpIdx < NumOperands) return *this; // Found a constant!
|
if (OpIdx < NumOperands) return *this; // Found a constant!
|
||||||
|
@ -115,8 +115,8 @@ public:
|
|||||||
inline ~IntervalIterator() {
|
inline ~IntervalIterator() {
|
||||||
if (IOwnMem)
|
if (IOwnMem)
|
||||||
while (!IntStack.empty()) {
|
while (!IntStack.empty()) {
|
||||||
delete operator*();
|
delete operator*();
|
||||||
IntStack.pop();
|
IntStack.pop();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -134,11 +134,11 @@ public:
|
|||||||
// All of the intervals on the stack have been visited. Try visiting
|
// All of the intervals on the stack have been visited. Try visiting
|
||||||
// their successors now.
|
// their successors now.
|
||||||
Interval::succ_iterator &SuccIt = IntStack.top().second,
|
Interval::succ_iterator &SuccIt = IntStack.top().second,
|
||||||
EndIt = succ_end(IntStack.top().first);
|
EndIt = succ_end(IntStack.top().first);
|
||||||
while (SuccIt != EndIt) { // Loop over all interval succs
|
while (SuccIt != EndIt) { // Loop over all interval succs
|
||||||
bool Done = ProcessInterval(getSourceGraphNode(OrigContainer, *SuccIt));
|
bool Done = ProcessInterval(getSourceGraphNode(OrigContainer, *SuccIt));
|
||||||
++SuccIt; // Increment iterator
|
++SuccIt; // Increment iterator
|
||||||
if (Done) return *this; // Found a new interval! Use it!
|
if (Done) return *this; // Found a new interval! Use it!
|
||||||
}
|
}
|
||||||
|
|
||||||
// Free interval memory... if necessary
|
// Free interval memory... if necessary
|
||||||
@ -196,19 +196,19 @@ private:
|
|||||||
|
|
||||||
if (Visited.count(NodeHeader)) { // Node already been visited?
|
if (Visited.count(NodeHeader)) { // Node already been visited?
|
||||||
if (Int->contains(NodeHeader)) { // Already in this interval...
|
if (Int->contains(NodeHeader)) { // Already in this interval...
|
||||||
return;
|
return;
|
||||||
} else { // In other interval, add as successor
|
} else { // In other interval, add as successor
|
||||||
if (!Int->isSuccessor(NodeHeader)) // Add only if not already in set
|
if (!Int->isSuccessor(NodeHeader)) // Add only if not already in set
|
||||||
Int->Successors.push_back(NodeHeader);
|
Int->Successors.push_back(NodeHeader);
|
||||||
}
|
}
|
||||||
} else { // Otherwise, not in interval yet
|
} else { // Otherwise, not in interval yet
|
||||||
for (typename IGT::ChildIteratorType I = IGT::child_begin(Node),
|
for (typename IGT::ChildIteratorType I = IGT::child_begin(Node),
|
||||||
E = IGT::child_end(Node); I != E; ++I) {
|
E = IGT::child_end(Node); I != E; ++I) {
|
||||||
if (!Int->contains(*I)) { // If pred not in interval, we can't be
|
if (!Int->contains(*I)) { // If pred not in interval, we can't be
|
||||||
if (!Int->isSuccessor(NodeHeader)) // Add only if not already in set
|
if (!Int->isSuccessor(NodeHeader)) // Add only if not already in set
|
||||||
Int->Successors.push_back(NodeHeader);
|
Int->Successors.push_back(NodeHeader);
|
||||||
return; // See you later
|
return; // See you later
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// If we get here, then all of the predecessors of BB are in the interval
|
// If we get here, then all of the predecessors of BB are in the interval
|
||||||
@ -217,17 +217,17 @@ private:
|
|||||||
Visited.insert(NodeHeader); // The node has now been visited!
|
Visited.insert(NodeHeader); // The node has now been visited!
|
||||||
|
|
||||||
if (Int->isSuccessor(NodeHeader)) {
|
if (Int->isSuccessor(NodeHeader)) {
|
||||||
// If we were in the successor list from before... remove from succ list
|
// If we were in the successor list from before... remove from succ list
|
||||||
Int->Successors.erase(std::remove(Int->Successors.begin(),
|
Int->Successors.erase(std::remove(Int->Successors.begin(),
|
||||||
Int->Successors.end(), NodeHeader),
|
Int->Successors.end(), NodeHeader),
|
||||||
Int->Successors.end());
|
Int->Successors.end());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Now that we have discovered that Node is in the interval, perhaps some
|
// Now that we have discovered that Node is in the interval, perhaps some
|
||||||
// of its successors are as well?
|
// of its successors are as well?
|
||||||
for (typename GT::ChildIteratorType It = GT::child_begin(Node),
|
for (typename GT::ChildIteratorType It = GT::child_begin(Node),
|
||||||
End = GT::child_end(Node); It != End; ++It)
|
End = GT::child_end(Node); It != End; ++It)
|
||||||
ProcessNode(Int, getSourceGraphNode(OrigContainer, *It));
|
ProcessNode(Int, getSourceGraphNode(OrigContainer, *It));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -37,7 +37,7 @@ enum VerifierFailureAction {
|
|||||||
AbortProcessAction, ///< verifyModule will print to stderr and abort()
|
AbortProcessAction, ///< verifyModule will print to stderr and abort()
|
||||||
ThrowExceptionAction, ///< verifyModule will throw errors as std::string
|
ThrowExceptionAction, ///< verifyModule will throw errors as std::string
|
||||||
PrintMessageAction, ///< verifyModule will print to stderr and return true
|
PrintMessageAction, ///< verifyModule will print to stderr and return true
|
||||||
ReturnStatusAction ///< verifyModule will just return true
|
ReturnStatusAction ///< verifyModule will just return true
|
||||||
};
|
};
|
||||||
|
|
||||||
/// @brief Create a verifier pass.
|
/// @brief Create a verifier pass.
|
||||||
|
@ -39,7 +39,7 @@ Module *ParseAssemblyFile(const std::string &Filename);// throw (ParseException)
|
|||||||
class ParseException {
|
class ParseException {
|
||||||
public:
|
public:
|
||||||
ParseException(const std::string &filename, const std::string &message,
|
ParseException(const std::string &filename, const std::string &message,
|
||||||
int LineNo = -1, int ColNo = -1);
|
int LineNo = -1, int ColNo = -1);
|
||||||
|
|
||||||
ParseException(const ParseException &E);
|
ParseException(const ParseException &E);
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ std::ostream &WriteAsOperand(std::ostream &, const Value *, bool PrintTy = true,
|
|||||||
bool PrintName = true, const Module *Context = 0);
|
bool PrintName = true, const Module *Context = 0);
|
||||||
|
|
||||||
std::ostream &WriteAsOperand(std::ostream&, const Type*, bool PrintTy = true,
|
std::ostream &WriteAsOperand(std::ostream&, const Type*, bool PrintTy = true,
|
||||||
bool PrintName = true, const Module* Context = 0);
|
bool PrintName = true, const Module* Context = 0);
|
||||||
|
|
||||||
} // End llvm namespace
|
} // End llvm namespace
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@ ModuleProvider *getBytecodeModuleProvider(
|
|||||||
ModuleProvider *getBytecodeBufferModuleProvider(const unsigned char *Buffer,
|
ModuleProvider *getBytecodeBufferModuleProvider(const unsigned char *Buffer,
|
||||||
unsigned BufferSize,
|
unsigned BufferSize,
|
||||||
const std::string &ModuleID="",
|
const std::string &ModuleID="",
|
||||||
BytecodeHandler* H = 0);
|
BytecodeHandler* H = 0);
|
||||||
|
|
||||||
/// @brief Parse the given bytecode file
|
/// @brief Parse the given bytecode file
|
||||||
Module* ParseBytecodeFile(const std::string &Filename,
|
Module* ParseBytecodeFile(const std::string &Filename,
|
||||||
|
Loading…
Reference in New Issue
Block a user