diff options
author | Alkis Evlogimenos <alkis@evlogimenos.com> | 2004-02-12 02:27:10 +0000 |
---|---|---|
committer | Alkis Evlogimenos <alkis@evlogimenos.com> | 2004-02-12 02:27:10 +0000 |
commit | 80da865f77a57c0dd923d6cea8a9619368e4e91b (patch) | |
tree | 58f8f017ffb174b24ad12b22b8db5aeffc9d9b58 /llvm/lib/CodeGen/MachineCodeForInstruction.cpp | |
parent | 0c3de446f6b20e7d9e826d1b308ad4043b609d05 (diff) | |
download | bcm5719-llvm-80da865f77a57c0dd923d6cea8a9619368e4e91b.tar.gz bcm5719-llvm-80da865f77a57c0dd923d6cea8a9619368e4e91b.zip |
Change MachineBasicBlock's vector of MachineInstr pointers into an
ilist of MachineInstr objects. This allows constant time removal and
insertion of MachineInstr instances from anywhere in each
MachineBasicBlock. It also allows for constant time splicing of
MachineInstrs into or out of MachineBasicBlocks.
llvm-svn: 11340
Diffstat (limited to 'llvm/lib/CodeGen/MachineCodeForInstruction.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineCodeForInstruction.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/MachineCodeForInstruction.cpp b/llvm/lib/CodeGen/MachineCodeForInstruction.cpp index 50a54099c5c..9d63df5bf85 100644 --- a/llvm/lib/CodeGen/MachineCodeForInstruction.cpp +++ b/llvm/lib/CodeGen/MachineCodeForInstruction.cpp @@ -60,9 +60,8 @@ MachineCodeForInstruction::~MachineCodeForInstruction() { for (unsigned i=0, N=tempVec.size(); i < N; i++) delete tempVec[i]; - // Free the MachineInstr objects allocated, if any. - for (unsigned i=0, N = size(); i < N; i++) - delete (*this)[i]; + // do not free the MachineInstr objects allocated. they are managed + // by the ilist in MachineBasicBlock // Free the CallArgsDescriptor if it exists. delete callArgsDesc; |