diff options
author | Evan Cheng <evan.cheng@apple.com> | 2008-03-24 23:31:21 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2008-03-24 23:31:21 +0000 |
commit | 8e5f24264a26020ecb2aaa7f4b7cbdb2d7c7d8fb (patch) | |
tree | 70a2e6fe6c1d48d67bf9f39e8abec3a8ba48eac5 /lib | |
parent | af091bdebb11e275b620a7638533fbd1ed388b10 (diff) | |
download | external_llvm-8e5f24264a26020ecb2aaa7f4b7cbdb2d7c7d8fb.zip external_llvm-8e5f24264a26020ecb2aaa7f4b7cbdb2d7c7d8fb.tar.gz external_llvm-8e5f24264a26020ecb2aaa7f4b7cbdb2d7c7d8fb.tar.bz2 |
If the coalescer commuted a def MI to allow coalescing, it can changed a previously coalesced copy into an non-identity copy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48752 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/CodeGen/SimpleRegisterCoalescing.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/SimpleRegisterCoalescing.cpp b/lib/CodeGen/SimpleRegisterCoalescing.cpp index 6326eda..6f5b523 100644 --- a/lib/CodeGen/SimpleRegisterCoalescing.cpp +++ b/lib/CodeGen/SimpleRegisterCoalescing.cpp @@ -323,7 +323,8 @@ bool SimpleRegisterCoalescing::RemoveCopyByCommutingDef(LiveInterval &IntA, MachineInstr *UseMI = &*UI; ++UI; if (JoinedCopies.count(UseMI)) - continue; + // It'll no longer be "joined" after the change. + JoinedCopies.erase(UseMI); unsigned UseIdx = li_->getInstructionIndex(UseMI); LiveInterval::iterator ULR = IntA.FindLiveRangeContaining(UseIdx); if (ULR->valno != AValNo) |