[GlobalISel] Add a localizer pass for target to use
authorQuentin Colombet <qcolombet@apple.com>
Sat, 27 May 2017 01:34:00 +0000 (01:34 +0000)
committerQuentin Colombet <qcolombet@apple.com>
Sat, 27 May 2017 01:34:00 +0000 (01:34 +0000)
commitbece442bd8b615e6095e38cabbf879df8e96b320
treea9be5df15080ae4c39ec16d6685d37ed7da0303b
parent5bbb5aafc10c3a164e966afcd30f5eace4ee033a
[GlobalISel] Add a localizer pass for target to use

This reverts commit r299287 plus clean-ups.

The localizer pass is a helper pass that could be run at O0 in the GISel
pipeline to work around the deficiency of the fast register allocator.
It basically shortens the live-ranges of the constants so that the
allocator does not spill all over the place.

Long term fix would be to make the greedy allocator fast.

llvm-svn: 304051
llvm/include/llvm/CodeGen/GlobalISel/Localizer.h [new file with mode: 0644]
llvm/include/llvm/CodeGen/MachineRegisterInfo.h
llvm/include/llvm/InitializePasses.h
llvm/lib/CodeGen/GlobalISel/CMakeLists.txt
llvm/lib/CodeGen/GlobalISel/GlobalISel.cpp
llvm/lib/CodeGen/GlobalISel/Localizer.cpp [new file with mode: 0644]
llvm/test/CodeGen/AArch64/GlobalISel/localizer.mir [new file with mode: 0644]