CodeGen: Use a single SlotTracker in MachineFunction::print()
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Fri, 26 Jun 2015 22:04:20 +0000 (22:04 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Fri, 26 Jun 2015 22:04:20 +0000 (22:04 +0000)
commit9a61a427138cb5f96c73257e8280f8e309dd73eb
tree540c0f721b2142969cd2d0519c042c3c64baf159
parent0be7d0cf17203388c9ed689a5c465a0ca726b59a
CodeGen: Use a single SlotTracker in MachineFunction::print()

Expose enough of the IR-level `SlotTracker` so that
`MachineFunction::print()` can use a single one for printing
`BasicBlock`s.  Next step would be to lift this through a few more APIs
so that we can make other print methods faster.

Fixes PR23865, changing the runtime of `llc -print-machineinstrs` from
many minutes (killed after 3 minutes, but it wasn't very close) to
13 seconds for a 502185 line dump.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240842 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/MachineBasicBlock.h
include/llvm/IR/ModuleSlotTracker.h [new file with mode: 0644]
include/llvm/IR/Value.h
lib/CodeGen/MachineBasicBlock.cpp
lib/CodeGen/MachineFunction.cpp
lib/IR/AsmWriter.cpp