mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Fold the useful features of alist and alist_node into ilist, and
a new ilist_node class, and remove them. Unlike alist_node, ilist_node doesn't attempt to manage storage itself, so it avoids the associated problems, including being opaque in gdb. Adjust the Recycler class so that it doesn't depend on alist_node. Also, change it to use explicit Size and Align parameters, allowing it to work when the largest-sized node doesn't have the greatest alignment requirement. Change MachineInstr's MachineMemOperand list from a pool-backed alist to a std::list for now. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54146 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
#define LLVM_INSTRUCTION_H
|
||||
|
||||
#include "llvm/User.h"
|
||||
#include "llvm/ADT/ilist_node.h"
|
||||
|
||||
namespace llvm {
|
||||
|
||||
@@ -24,15 +25,11 @@ struct AssemblyAnnotationWriter;
|
||||
template<typename ValueSubClass, typename ItemParentClass>
|
||||
class SymbolTableListTraits;
|
||||
|
||||
class Instruction : public User {
|
||||
class Instruction : public User, public ilist_node<Instruction> {
|
||||
void operator=(const Instruction &); // Do not implement
|
||||
Instruction(const Instruction &); // Do not implement
|
||||
|
||||
BasicBlock *Parent;
|
||||
Instruction *Prev, *Next; // Next and Prev links for our intrusive linked list
|
||||
|
||||
void setNext(Instruction *N) { Next = N; }
|
||||
void setPrev(Instruction *N) { Prev = N; }
|
||||
|
||||
friend class SymbolTableListTraits<Instruction, BasicBlock>;
|
||||
void setParent(BasicBlock *P);
|
||||
@@ -230,14 +227,6 @@ public:
|
||||
#define LAST_OTHER_INST(N) OtherOpsEnd = N+1
|
||||
#include "llvm/Instruction.def"
|
||||
};
|
||||
|
||||
private:
|
||||
// getNext/Prev - Return the next or previous instruction in the list. The
|
||||
// last node in the list is a terminator instruction.
|
||||
Instruction *getNext() { return Next; }
|
||||
const Instruction *getNext() const { return Next; }
|
||||
Instruction *getPrev() { return Prev; }
|
||||
const Instruction *getPrev() const { return Prev; }
|
||||
};
|
||||
|
||||
} // End llvm namespace
|
||||
|
Reference in New Issue
Block a user