[RegAllocGreedy] Provide a flag to disable the local reassignment heuristic.
authorQuentin Colombet <qcolombet@apple.com>
Tue, 1 Jul 2014 14:08:37 +0000 (14:08 +0000)
committerQuentin Colombet <qcolombet@apple.com>
Tue, 1 Jul 2014 14:08:37 +0000 (14:08 +0000)
commit230bb1b426b4a85b697e967a19349db57bd18484
treeb21a7535357c5b6a099d049524fb56f54feedfbc
parent25b7acf34fc7812e671799a73c90e738f6c5386b
[RegAllocGreedy] Provide a flag to disable the local reassignment heuristic.
By default, no functionality change.

Before evicting a local variable, this heuristic tries to find another (set of)
local(s) that can be reassigned to a free color.

In some extreme cases (large basic blocks with tons of local variables), the
compilation time is dominated by the local interference checks that this
heuristic must perform, with no code gen gain.
E.g., the motivating example takes 4 minutes to compile with this heuristic, 12
seconds without.

Improving the situation will likely require to make drastic changes to the
register allocator and/or the interference check framework.

For now, provide this flag to better understand the impact of that heuristic.

<rdar://problem/17444599>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212099 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/RegAllocGreedy.cpp