mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-15 05:24:01 +00:00
After trivial coalescing, the MI being visited may have become a copy. Avoid adding it to CSE hash table since copies aren't being considered for CSE and they may be deleted.
rdar://7819990 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100170 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -294,8 +294,12 @@ bool MachineCSE::ProcessBlock(MachineDomTreeNode *Node) {
|
||||
bool FoundCSE = VNT.count(MI);
|
||||
if (!FoundCSE) {
|
||||
// Look for trivial copy coalescing opportunities.
|
||||
if (PerformTrivialCoalescing(MI, MBB))
|
||||
if (PerformTrivialCoalescing(MI, MBB)) {
|
||||
// After coalescing MI itself may become a copy.
|
||||
if (isCopy(MI, TII))
|
||||
continue;
|
||||
FoundCSE = VNT.count(MI);
|
||||
}
|
||||
}
|
||||
// FIXME: commute commutable instructions?
|
||||
|
||||
|
Reference in New Issue
Block a user