Also attempt trivial coalescing for live intervals that end in a copy.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Thu, 10 Dec 2009 17:48:32 +0000 (17:48 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Thu, 10 Dec 2009 17:48:32 +0000 (17:48 +0000)
commitcf97036675340bc889cfe04295cda63afe9496e2
tree9f44d599aa051eb2bab3ba3780a4e261346be54b
parentf05e45eb373a47054cd569e9bf727f71109be382
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 is more conservative than r90502, and does not break
483.xalancbmk/i686. It still breaks the PowerPC bootstrap, so it is disabled
by default, and can be enabled with the -trivial-coalesce-ends option.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91049 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/LiveIntervalAnalysis.h
lib/CodeGen/LiveIntervalAnalysis.cpp
lib/CodeGen/RegAllocLinearScan.cpp