Make physreg coalescing independent on the number of uses of the virtual register.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Wed, 9 Mar 2011 19:27:06 +0000 (19:27 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Wed, 9 Mar 2011 19:27:06 +0000 (19:27 +0000)
commit5d96e5a1ccbdc4d64db4e15418392bb7c61e4d6f
treeb48fc27fb9e25bb4271021437c25a3d3f5281d1f
parentdda386c44d994d59593f5281155378fbe865d364
Make physreg coalescing independent on the number of uses of the virtual register.

The damage done by physreg coalescing only depends on the number of instructions
the extended physreg live range covers. This fixes PR9438.

The heuristic is still luck-based, and physreg coalescing really should be
disabled completely. We need a register allocator with better hinting support
before that is possible.

Convert a test to FileCheck and force spilling by inserting an extra call. The
previous spilling behavior was dependent on misguided physreg coalescing
decisions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127351 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SimpleRegisterCoalescing.cpp
test/CodeGen/X86/2011-03-09-Physreg-Coalescing.ll [new file with mode: 0644]
test/CodeGen/X86/fold-pcmpeqd-2.ll