diff options
author | Chris Lattner <sabre@nondot.org> | 2004-02-19 18:34:02 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-02-19 18:34:02 +0000 |
commit | f5c5e1f458baf1ef29aeb47cec067b08d5443e9b (patch) | |
tree | b522705e73e4d63b1ac6039c0dad60d0c05f315b /llvm/lib/CodeGen/RegAllocLocal.cpp | |
parent | 4c988391e1de99755a5d872a501b69f2fbbe964c (diff) | |
download | bcm5719-llvm-f5c5e1f458baf1ef29aeb47cec067b08d5443e9b.tar.gz bcm5719-llvm-f5c5e1f458baf1ef29aeb47cec067b08d5443e9b.zip |
Fix problem fusing spill code into instructions: we didn't update the live
variable information to take into account the change of instruction
address.
llvm-svn: 11628
Diffstat (limited to 'llvm/lib/CodeGen/RegAllocLocal.cpp')
-rw-r--r-- | llvm/lib/CodeGen/RegAllocLocal.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/RegAllocLocal.cpp b/llvm/lib/CodeGen/RegAllocLocal.cpp index cbbc7c22997..188b3b34170 100644 --- a/llvm/lib/CodeGen/RegAllocLocal.cpp +++ b/llvm/lib/CodeGen/RegAllocLocal.cpp @@ -496,6 +496,9 @@ MachineInstr *RA::reloadVirtReg(MachineBasicBlock &MBB, MachineInstr *MI, MachineBasicBlock::iterator MII = MI; if (RegInfo->foldMemoryOperand(MII, OpNum, FrameIndex)) { ++NumFused; + // Since we changed the address of MI, make sure to update live variables + // to know that the new instruction has the properties of the old one. + LV->instructionChanged(MI, MII); return MII; } |