summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/PIC16
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-07-07 23:14:23 +0000
committerDan Gohman <gohman@apple.com>2008-07-07 23:14:23 +0000
commit3b46030375b309ac6e198664bbbf859884318084 (patch)
tree384b02de07f0f190d5753652f676f6c9a9a7d00c /llvm/lib/Target/PIC16
parent7f8b6d5f8034a78638f9e82e42b6e647bed7106e (diff)
downloadbcm5719-llvm-3b46030375b309ac6e198664bbbf859884318084.tar.gz
bcm5719-llvm-3b46030375b309ac6e198664bbbf859884318084.zip
Pool-allocation for MachineInstrs, MachineBasicBlocks, and
MachineMemOperands. The pools are owned by MachineFunctions. This drastically reduces the number of calls to malloc/free made during the "Emit" phase of scheduling, as well as later phases in CodeGen. Combined with other changes, this speeds up the "instruction selection" phase of CodeGen by 10% in some cases. llvm-svn: 53212
Diffstat (limited to 'llvm/lib/Target/PIC16')
-rw-r--r--llvm/lib/Target/PIC16/PIC16RegisterInfo.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/PIC16/PIC16RegisterInfo.cpp b/llvm/lib/Target/PIC16/PIC16RegisterInfo.cpp
index 88e84acfe38..9a83155e4f6 100644
--- a/llvm/lib/Target/PIC16/PIC16RegisterInfo.cpp
+++ b/llvm/lib/Target/PIC16/PIC16RegisterInfo.cpp
@@ -61,7 +61,7 @@ void PIC16RegisterInfo::reMaterialize(MachineBasicBlock &MBB,
unsigned DestReg,
const MachineInstr *Orig) const
{
- MachineInstr *MI = Orig->clone();
+ MachineInstr *MI = MBB.getParent()->CloneMachineInstr(Orig);
MI->getOperand(0).setReg(DestReg);
MBB.insert(I, MI);
}
OpenPOWER on IntegriCloud