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
diff --git a/lib/CodeGen/MachineInstr.cpp b/lib/CodeGen/MachineInstr.cpp
index d577582..c952293 100644
--- a/lib/CodeGen/MachineInstr.cpp
+++ b/lib/CodeGen/MachineInstr.cpp
@@ -322,7 +322,7 @@
   NumImplicitOps = MI.NumImplicitOps;
 
   // Add memory operands.
-  for (alist<MachineMemOperand>::const_iterator i = MI.memoperands_begin(),
+  for (std::list<MachineMemOperand>::const_iterator i = MI.memoperands_begin(),
        j = MI.memoperands_end(); i != j; ++i)
     addMemOperand(MF, *i);
 
@@ -506,13 +506,12 @@
 /// referencing arbitrary storage.
 void MachineInstr::addMemOperand(MachineFunction &MF,
                                  const MachineMemOperand &MO) {
-  MemOperands.push_back(MF.CreateMachineMemOperand(MO));
+  MemOperands.push_back(MO);
 }
 
 /// clearMemOperands - Erase all of this MachineInstr's MachineMemOperands.
 void MachineInstr::clearMemOperands(MachineFunction &MF) {
-  while (!MemOperands.empty())
-    MF.DeleteMachineMemOperand(MemOperands.remove(MemOperands.begin()));
+  MemOperands.clear();
 }
 
 
@@ -731,7 +730,7 @@
 
   if (!memoperands_empty()) {
     OS << ", Mem:";
-    for (alist<MachineMemOperand>::const_iterator i = memoperands_begin(),
+    for (std::list<MachineMemOperand>::const_iterator i = memoperands_begin(),
          e = memoperands_end(); i != e; ++i) {
       const MachineMemOperand &MRO = *i;
       const Value *V = MRO.getValue();