mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-02 00:37:09 +00:00
Improve conformance with the Misha spelling benchmark suite
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19930 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
5c3fa1ec79
commit
bca81448ac
@ -60,8 +60,8 @@ struct ilist_traits {
|
|||||||
|
|
||||||
static NodeTy *createNode(const NodeTy &V) { return new NodeTy(V); }
|
static NodeTy *createNode(const NodeTy &V) { return new NodeTy(V); }
|
||||||
|
|
||||||
static NodeTy *createSentinal() { return new NodeTy(); }
|
static NodeTy *createSentinel() { return new NodeTy(); }
|
||||||
static void destroySentinal(NodeTy *N) { delete N; }
|
static void destroySentinel(NodeTy *N) { delete N; }
|
||||||
|
|
||||||
void addNodeToList(NodeTy *NTy) {}
|
void addNodeToList(NodeTy *NTy) {}
|
||||||
void removeNodeFromList(NodeTy *NTy) {}
|
void removeNodeFromList(NodeTy *NTy) {}
|
||||||
@ -302,11 +302,11 @@ public:
|
|||||||
typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
|
typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
|
||||||
typedef std::reverse_iterator<iterator> reverse_iterator;
|
typedef std::reverse_iterator<iterator> reverse_iterator;
|
||||||
|
|
||||||
iplist() : Head(Traits::createSentinal()), Tail(Head) {
|
iplist() : Head(Traits::createSentinel()), Tail(Head) {
|
||||||
setNext(Head, 0);
|
setNext(Head, 0);
|
||||||
setPrev(Head, 0);
|
setPrev(Head, 0);
|
||||||
}
|
}
|
||||||
~iplist() { clear(); Traits::destroySentinal(Tail); }
|
~iplist() { clear(); Traits::destroySentinel(Tail); }
|
||||||
|
|
||||||
// Iterator creation methods.
|
// Iterator creation methods.
|
||||||
iterator begin() { return iterator(Head); }
|
iterator begin() { return iterator(Head); }
|
||||||
|
@ -369,8 +369,8 @@ struct ilist_traits<DSNode> {
|
|||||||
static void setPrev(DSNode *N, DSNode *Prev) { N->Prev = Prev; }
|
static void setPrev(DSNode *N, DSNode *Prev) { N->Prev = Prev; }
|
||||||
static void setNext(DSNode *N, DSNode *Next) { N->Next = Next; }
|
static void setNext(DSNode *N, DSNode *Next) { N->Next = Next; }
|
||||||
|
|
||||||
static DSNode *createSentinal() { return new DSNode(0,0); }
|
static DSNode *createSentinel() { return new DSNode(0,0); }
|
||||||
static void destroySentinal(DSNode *N) { delete N; }
|
static void destroySentinel(DSNode *N) { delete N; }
|
||||||
//static DSNode *createNode(const DSNode &V) { return new DSNode(V); }
|
//static DSNode *createNode(const DSNode &V) { return new DSNode(V); }
|
||||||
|
|
||||||
|
|
||||||
|
@ -40,9 +40,9 @@ template <class Ptr, class USE_iterator> class PredIterator;
|
|||||||
|
|
||||||
template<> struct ilist_traits<Instruction>
|
template<> struct ilist_traits<Instruction>
|
||||||
: public SymbolTableListTraits<Instruction, BasicBlock, Function> {
|
: public SymbolTableListTraits<Instruction, BasicBlock, Function> {
|
||||||
// createSentinal is used to create a node that marks the end of the list...
|
// createSentinel is used to create a node that marks the end of the list...
|
||||||
static Instruction *createSentinal();
|
static Instruction *createSentinel();
|
||||||
static void destroySentinal(Instruction *I) { delete I; }
|
static void destroySentinel(Instruction *I) { delete I; }
|
||||||
static iplist<Instruction> &getList(BasicBlock *BB);
|
static iplist<Instruction> &getList(BasicBlock *BB);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -31,18 +31,18 @@ class FunctionType;
|
|||||||
template<> struct ilist_traits<BasicBlock>
|
template<> struct ilist_traits<BasicBlock>
|
||||||
: public SymbolTableListTraits<BasicBlock, Function, Function> {
|
: public SymbolTableListTraits<BasicBlock, Function, Function> {
|
||||||
|
|
||||||
// createSentinal is used to create a node that marks the end of the list...
|
// createSentinel is used to create a node that marks the end of the list...
|
||||||
static BasicBlock *createSentinal();
|
static BasicBlock *createSentinel();
|
||||||
static void destroySentinal(BasicBlock *BB) { delete BB; }
|
static void destroySentinel(BasicBlock *BB) { delete BB; }
|
||||||
static iplist<BasicBlock> &getList(Function *F);
|
static iplist<BasicBlock> &getList(Function *F);
|
||||||
};
|
};
|
||||||
|
|
||||||
template<> struct ilist_traits<Argument>
|
template<> struct ilist_traits<Argument>
|
||||||
: public SymbolTableListTraits<Argument, Function, Function> {
|
: public SymbolTableListTraits<Argument, Function, Function> {
|
||||||
|
|
||||||
// createSentinal is used to create a node that marks the end of the list...
|
// createSentinel is used to create a node that marks the end of the list...
|
||||||
static Argument *createSentinal();
|
static Argument *createSentinel();
|
||||||
static void destroySentinal(Argument *A) { delete A; }
|
static void destroySentinel(Argument *A) { delete A; }
|
||||||
static iplist<Argument> &getList(Function *F);
|
static iplist<Argument> &getList(Function *F);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -32,16 +32,16 @@ class SymbolTable;
|
|||||||
|
|
||||||
template<> struct ilist_traits<Function>
|
template<> struct ilist_traits<Function>
|
||||||
: public SymbolTableListTraits<Function, Module, Module> {
|
: public SymbolTableListTraits<Function, Module, Module> {
|
||||||
// createSentinal is used to create a node that marks the end of the list.
|
// createSentinel is used to create a node that marks the end of the list.
|
||||||
static Function *createSentinal();
|
static Function *createSentinel();
|
||||||
static void destroySentinal(Function *F) { delete F; }
|
static void destroySentinel(Function *F) { delete F; }
|
||||||
static iplist<Function> &getList(Module *M);
|
static iplist<Function> &getList(Module *M);
|
||||||
};
|
};
|
||||||
template<> struct ilist_traits<GlobalVariable>
|
template<> struct ilist_traits<GlobalVariable>
|
||||||
: public SymbolTableListTraits<GlobalVariable, Module, Module> {
|
: public SymbolTableListTraits<GlobalVariable, Module, Module> {
|
||||||
// createSentinal is used to create a node that marks the end of the list.
|
// createSentinel is used to create a node that marks the end of the list.
|
||||||
static GlobalVariable *createSentinal();
|
static GlobalVariable *createSentinel();
|
||||||
static void destroySentinal(GlobalVariable *GV) { delete GV; }
|
static void destroySentinel(GlobalVariable *GV) { delete GV; }
|
||||||
static iplist<GlobalVariable> &getList(Module *M);
|
static iplist<GlobalVariable> &getList(Module *M);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -84,12 +84,12 @@ struct ilist_traits<Use> {
|
|||||||
static void setPrev(Use *N, Use *Prev) { N->UseLinks.Prev = Prev; }
|
static void setPrev(Use *N, Use *Prev) { N->UseLinks.Prev = Prev; }
|
||||||
static void setNext(Use *N, Use *Next) { N->UseLinks.Next = Next; }
|
static void setNext(Use *N, Use *Next) { N->UseLinks.Next = Next; }
|
||||||
|
|
||||||
/// createSentinal - this is used to create the end marker for the use list.
|
/// createSentinel - this is used to create the end marker for the use list.
|
||||||
/// Note that we only allocate a UseLinks structure, which is just enough to
|
/// Note that we only allocate a UseLinks structure, which is just enough to
|
||||||
/// hold the next/prev pointers. This saves us 8 bytes of memory for every
|
/// hold the next/prev pointers. This saves us 8 bytes of memory for every
|
||||||
/// Value allocated.
|
/// Value allocated.
|
||||||
static Use *createSentinal() { return (Use*)new Use::NextPrevPtrs(); }
|
static Use *createSentinel() { return (Use*)new Use::NextPrevPtrs(); }
|
||||||
static void destroySentinal(Use *S) { delete (Use::NextPrevPtrs*)S; }
|
static void destroySentinel(Use *S) { delete (Use::NextPrevPtrs*)S; }
|
||||||
|
|
||||||
void addNodeToList(Use *NTy) {}
|
void addNodeToList(Use *NTy) {}
|
||||||
void removeNodeFromList(Use *NTy) {}
|
void removeNodeFromList(Use *NTy) {}
|
||||||
|
@ -46,7 +46,7 @@ void ilist_traits<MachineBasicBlock>::removeNodeFromList(MachineBasicBlock* N) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
MachineInstr* ilist_traits<MachineInstr>::createSentinal() {
|
MachineInstr* ilist_traits<MachineInstr>::createSentinel() {
|
||||||
MachineInstr* dummy = new MachineInstr(0, 0);
|
MachineInstr* dummy = new MachineInstr(0, 0);
|
||||||
LeakDetector::removeGarbageObject(dummy);
|
LeakDetector::removeGarbageObject(dummy);
|
||||||
return dummy;
|
return dummy;
|
||||||
|
@ -90,7 +90,7 @@ FunctionPass *llvm::createMachineCodeDeleter() {
|
|||||||
// MachineFunction implementation
|
// MachineFunction implementation
|
||||||
//===---------------------------------------------------------------------===//
|
//===---------------------------------------------------------------------===//
|
||||||
|
|
||||||
MachineBasicBlock* ilist_traits<MachineBasicBlock>::createSentinal() {
|
MachineBasicBlock* ilist_traits<MachineBasicBlock>::createSentinel() {
|
||||||
MachineBasicBlock* dummy = new MachineBasicBlock();
|
MachineBasicBlock* dummy = new MachineBasicBlock();
|
||||||
LeakDetector::removeGarbageObject(dummy);
|
LeakDetector::removeGarbageObject(dummy);
|
||||||
return dummy;
|
return dummy;
|
||||||
|
@ -48,7 +48,7 @@ namespace {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
Instruction *ilist_traits<Instruction>::createSentinal() {
|
Instruction *ilist_traits<Instruction>::createSentinel() {
|
||||||
return new DummyInst();
|
return new DummyInst();
|
||||||
}
|
}
|
||||||
iplist<Instruction> &ilist_traits<Instruction>::getList(BasicBlock *BB) {
|
iplist<Instruction> &ilist_traits<Instruction>::getList(BasicBlock *BB) {
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
#include "llvm/ADT/StringExtras.h"
|
#include "llvm/ADT/StringExtras.h"
|
||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
|
|
||||||
BasicBlock *ilist_traits<BasicBlock>::createSentinal() {
|
BasicBlock *ilist_traits<BasicBlock>::createSentinel() {
|
||||||
BasicBlock *Ret = new BasicBlock();
|
BasicBlock *Ret = new BasicBlock();
|
||||||
// This should not be garbage monitored.
|
// This should not be garbage monitored.
|
||||||
LeakDetector::removeGarbageObject(Ret);
|
LeakDetector::removeGarbageObject(Ret);
|
||||||
@ -31,7 +31,7 @@ iplist<BasicBlock> &ilist_traits<BasicBlock>::getList(Function *F) {
|
|||||||
return F->getBasicBlockList();
|
return F->getBasicBlockList();
|
||||||
}
|
}
|
||||||
|
|
||||||
Argument *ilist_traits<Argument>::createSentinal() {
|
Argument *ilist_traits<Argument>::createSentinel() {
|
||||||
Argument *Ret = new Argument(Type::IntTy);
|
Argument *Ret = new Argument(Type::IntTy);
|
||||||
// This should not be garbage monitored.
|
// This should not be garbage monitored.
|
||||||
LeakDetector::removeGarbageObject(Ret);
|
LeakDetector::removeGarbageObject(Ret);
|
||||||
|
@ -28,7 +28,7 @@ using namespace llvm;
|
|||||||
// Methods to implement the globals and functions lists.
|
// Methods to implement the globals and functions lists.
|
||||||
//
|
//
|
||||||
|
|
||||||
Function *ilist_traits<Function>::createSentinal() {
|
Function *ilist_traits<Function>::createSentinel() {
|
||||||
FunctionType *FTy =
|
FunctionType *FTy =
|
||||||
FunctionType::get(Type::VoidTy, std::vector<const Type*>(), false);
|
FunctionType::get(Type::VoidTy, std::vector<const Type*>(), false);
|
||||||
Function *Ret = new Function(FTy, GlobalValue::ExternalLinkage);
|
Function *Ret = new Function(FTy, GlobalValue::ExternalLinkage);
|
||||||
@ -36,7 +36,7 @@ Function *ilist_traits<Function>::createSentinal() {
|
|||||||
LeakDetector::removeGarbageObject(Ret);
|
LeakDetector::removeGarbageObject(Ret);
|
||||||
return Ret;
|
return Ret;
|
||||||
}
|
}
|
||||||
GlobalVariable *ilist_traits<GlobalVariable>::createSentinal() {
|
GlobalVariable *ilist_traits<GlobalVariable>::createSentinel() {
|
||||||
GlobalVariable *Ret = new GlobalVariable(Type::IntTy, false,
|
GlobalVariable *Ret = new GlobalVariable(Type::IntTy, false,
|
||||||
GlobalValue::ExternalLinkage);
|
GlobalValue::ExternalLinkage);
|
||||||
// This should not be garbage monitored.
|
// This should not be garbage monitored.
|
||||||
|
Loading…
Reference in New Issue
Block a user