diff options
author | Evan Cheng <evan.cheng@apple.com> | 2008-07-03 09:09:37 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2008-07-03 09:09:37 +0000 |
commit | 9f1c8317a4676945b4961ddb9827ef2412551620 (patch) | |
tree | c713798c01964fdb5e667374c5f276d9cec2795e /lib/Target/CellSPU | |
parent | f9d0318950c60aa723ff650701f0365f0aafebd6 (diff) | |
download | external_llvm-9f1c8317a4676945b4961ddb9827ef2412551620.zip external_llvm-9f1c8317a4676945b4961ddb9827ef2412551620.tar.gz external_llvm-9f1c8317a4676945b4961ddb9827ef2412551620.tar.bz2 |
- Remove calls to copyKillDeadInfo which is an N^2 function. Instead, propagate kill / dead markers as new instructions are constructed in foldMemoryOperand, convertToThressAddress, etc.
- Also remove LiveVariables::instructionChanged, etc. Replace all calls with cheaper calls which update VarInfo kill list.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53097 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/CellSPU')
-rw-r--r-- | lib/Target/CellSPU/SPUInstrInfo.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/Target/CellSPU/SPUInstrInfo.cpp b/lib/Target/CellSPU/SPUInstrInfo.cpp index 3e991a9..aef3611 100644 --- a/lib/Target/CellSPU/SPUInstrInfo.cpp +++ b/lib/Target/CellSPU/SPUInstrInfo.cpp @@ -412,20 +412,22 @@ SPUInstrInfo::foldMemoryOperand(MachineFunction &MF, && MI->getOperand(1).getReg() == MI->getOperand(2).getReg()) { if (OpNum == 0) { // move -> store unsigned InReg = MI->getOperand(1).getReg(); + bool isKill = MI->getOperand(1).isKill(); if (FrameIndex < SPUFrameInfo::maxFrameOffset()) { - NewMI = addFrameReference(BuildMI(TII.get(SPU::STQDr32)).addReg(InReg), + NewMI = addFrameReference(BuildMI(TII.get(SPU::STQDr32)) + .addReg(InReg, false, false, isKill), FrameIndex); } } else { // move -> load unsigned OutReg = MI->getOperand(0).getReg(); - Opc = (FrameIndex < SPUFrameInfo::maxFrameOffset()) ? SPU::STQDr32 : SPU::STQXr32; - NewMI = addFrameReference(BuildMI(TII.get(Opc), OutReg), FrameIndex); + bool isDead = MI->getOperand(0).isDead(); + Opc = (FrameIndex < SPUFrameInfo::maxFrameOffset()) + ? SPU::STQDr32 : SPU::STQXr32; + NewMI = addFrameReference(BuildMI(TII.get(Opc)) + .addReg(OutReg, true, false, false, isDead), FrameIndex); } } - if (NewMI) - NewMI->copyKillDeadInfo(MI); - return NewMI; #else return 0; |