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/Alpha/AlphaInstrInfo.cpp | |
parent | f9d0318950c60aa723ff650701f0365f0aafebd6 (diff) | |
download | llvm-9f1c8317a4676945b4961ddb9827ef2412551620.tar.gz llvm-9f1c8317a4676945b4961ddb9827ef2412551620.tar.bz2 llvm-9f1c8317a4676945b4961ddb9827ef2412551620.tar.xz |
- 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/Alpha/AlphaInstrInfo.cpp')
-rw-r--r-- | lib/Target/Alpha/AlphaInstrInfo.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/Target/Alpha/AlphaInstrInfo.cpp b/lib/Target/Alpha/AlphaInstrInfo.cpp index 96a75a6aa7..6f96ff0f1e 100644 --- a/lib/Target/Alpha/AlphaInstrInfo.cpp +++ b/lib/Target/Alpha/AlphaInstrInfo.cpp @@ -269,23 +269,25 @@ MachineInstr *AlphaInstrInfo::foldMemoryOperand(MachineFunction &MF, if (MI->getOperand(1).getReg() == MI->getOperand(2).getReg()) { if (Ops[0] == 0) { // move -> store unsigned InReg = MI->getOperand(1).getReg(); + bool isKill = MI->getOperand(1).isKill(); Opc = (Opc == Alpha::BISr) ? Alpha::STQ : ((Opc == Alpha::CPYSS) ? Alpha::STS : Alpha::STT); - NewMI = BuildMI(get(Opc)).addReg(InReg).addFrameIndex(FrameIndex) + NewMI = BuildMI(get(Opc)).addReg(InReg, false, false, isKill) + .addFrameIndex(FrameIndex) .addReg(Alpha::F31); } else { // load -> move unsigned OutReg = MI->getOperand(0).getReg(); + bool isDead = MI->getOperand(0).isDead(); Opc = (Opc == Alpha::BISr) ? Alpha::LDQ : ((Opc == Alpha::CPYSS) ? Alpha::LDS : Alpha::LDT); - NewMI = BuildMI(get(Opc), OutReg).addFrameIndex(FrameIndex) + NewMI = BuildMI(get(Opc)).addReg(OutReg, true, false, false, isDead) + .addFrameIndex(FrameIndex) .addReg(Alpha::F31); } } break; } - if (NewMI) - NewMI->copyKillDeadInfo(MI); - return 0; + return NewMI; } static unsigned AlphaRevCondCode(unsigned Opcode) { |