[PHIElimination] Compile time optimization for huge functions.
authorJonas Paulsson <paulsson@linux.vnet.ibm.com>
Mon, 20 Jan 2020 20:56:09 +0000 (21:56 +0100)
committerJonas Paulsson <paulsson@linux.vnet.ibm.com>
Wed, 5 Feb 2020 23:10:03 +0000 (18:10 -0500)
commit96ea377ea4d6d8cb304a2f5ad69fd33fd1fade6f
treebd09f36a1daead081cfcf7d95d08a72e89b9e4e1
parent5c15e8e682e365b3a7fcf35200df79f3fb93b924
[PHIElimination]  Compile time optimization for huge functions.

This is a compile-time optimization for PHIElimination (splitting of critical
edges), which was reported at https://bugs.llvm.org/show_bug.cgi?id=44249. As
discussed there, the way to remedy the slowdowns with huge functions is to
pre-compute the live-in registers for each MBB in an efficient way in
PHIElimination.cpp and then pass that information along to
LiveVariabless::addNewBlock().

In all the huge test programs where this slowdown has been noticable, it has
dissapeared entirely with this patch.

Review: Björn Pettersson, Quentin Colombet.

Differential Revision: https://reviews.llvm.org/D73152
llvm/include/llvm/CodeGen/LiveVariables.h
llvm/include/llvm/CodeGen/MachineBasicBlock.h
llvm/lib/CodeGen/LiveVariables.cpp
llvm/lib/CodeGen/MachineBasicBlock.cpp
llvm/lib/CodeGen/PHIElimination.cpp