Also attempt trivial coalescing for live intervals that end in a copy.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Fri, 4 Dec 2009 00:16:04 +0000 (00:16 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Fri, 4 Dec 2009 00:16:04 +0000 (00:16 +0000)
commit6b74e505be1016223e090a6c806f7caa3165a146
treedcc016454a3e8332b8d9f3e22e331a4ab0073158
parent2e65c29ac64e7b36603d1a1de3d01cdfd2e61e23
Also attempt trivial coalescing for live intervals that end in a copy.

The coalescer is supposed to clean these up, but when setting up parameters
for a function call, there may be copies to physregs. If the defining
instruction has been LICM'ed far away, the coalescer won't touch it.

The register allocation hint does not always work - when the register
allocator is backtracking, it clears the hints.

This patch takes care of a few more cases that r90163 missed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90502 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/LiveIntervalAnalysis.h
lib/CodeGen/LiveIntervalAnalysis.cpp
lib/CodeGen/RegAllocLinearScan.cpp
test/CodeGen/X86/2009-01-12-CoalescerBug.ll
test/CodeGen/X86/twoaddr-coalesce.ll