diff options
author | Dan Gohman <gohman@apple.com> | 2008-07-28 21:51:04 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2008-07-28 21:51:04 +0000 |
commit | 804c95df52ebfba155aa5697aeb283adcd28477a (patch) | |
tree | c3bdab8fada8c2fa76f62c12ee40275667d6ed02 /llvm/lib/VMCore/BasicBlock.cpp | |
parent | 813bf7af7f62c0a8cff9bcefadab766cd85641c2 (diff) | |
download | bcm5719-llvm-804c95df52ebfba155aa5697aeb283adcd28477a.tar.gz bcm5719-llvm-804c95df52ebfba155aa5697aeb283adcd28477a.zip |
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.
llvm-svn: 54146
Diffstat (limited to 'llvm/lib/VMCore/BasicBlock.cpp')
-rw-r--r-- | llvm/lib/VMCore/BasicBlock.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/VMCore/BasicBlock.cpp b/llvm/lib/VMCore/BasicBlock.cpp index 64711fea0c7..514aa1de237 100644 --- a/llvm/lib/VMCore/BasicBlock.cpp +++ b/llvm/lib/VMCore/BasicBlock.cpp @@ -15,6 +15,7 @@ #include "llvm/Constants.h" #include "llvm/Instructions.h" #include "llvm/Type.h" +#include "llvm/ADT/STLExtras.h" #include "llvm/Support/CFG.h" #include "llvm/Support/LeakDetector.h" #include "llvm/Support/Compiler.h" @@ -260,7 +261,9 @@ BasicBlock *BasicBlock::splitBasicBlock(iterator I, const std::string &BBName) { assert(I != InstList.end() && "Trying to get me to create degenerate basic block!"); - BasicBlock *New = BasicBlock::Create(BBName, getParent(), getNext()); + BasicBlock *InsertBefore = next(Function::iterator(this)) + .getNodePtrUnchecked(); + BasicBlock *New = BasicBlock::Create(BBName, getParent(), InsertBefore); // Move all of the specified instructions from the original basic block into // the new basic block. |