Now that mem2reg understands how to cope with a slightly wider set of
authorChandler Carruth <chandlerc@gmail.com>
Sun, 28 Jul 2013 08:27:12 +0000 (08:27 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Sun, 28 Jul 2013 08:27:12 +0000 (08:27 +0000)
commit9d96100ff026db6fcad6518ba6b1d462ecf1d069
tree15141c76dc3afaf04676b30216ba723d394c22d4
parentd5b806a27ffb83860a54fe0161ad398388b7278e
Now that mem2reg understands how to cope with a slightly wider set of
uses of an alloca, we can pre-compute promotability while analyzing an
alloca for splitting in SROA. That lets us short-circuit the common case
of a bunch of trivially promotable allocas. This cuts 20% to 30% off the
run time of SROA for typical frontend-generated IR sequneces I'm seeing.
It gets the new SROA to within 20% of ScalarRepl for such code. My
current benchmark for these numbers is PR15412, but it fits the general
pattern of IR emitted by Clang so it should be widely applicable.

llvm-svn: 187323
llvm/lib/Transforms/Scalar/SROA.cpp