Cache intermediate results during traceSiblingValue.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Wed, 7 Sep 2011 19:07:31 +0000 (19:07 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Wed, 7 Sep 2011 19:07:31 +0000 (19:07 +0000)
commit2c207a0f677a2d78b768acb559e6b9f6f112a50d
treef869a6df29e40bdd0ab882ed1cd1c2786d594e8d
parentd5ccb0558fe986585fc56d208b35d0deec1912ff
Cache intermediate results during traceSiblingValue.

In some cases such as interpreters using indirectbr, the CFG can be very
complicated, and live range splitting may be forced to insert a large
number of phi-defs.  When that happens, traceSiblingValue can spend a
lot of time zipping around in the CFG looking for defs and reloads.

This patch causes more information to be cached in SibValues, and the
cached values are used to terminate searches early.  This speeds up
spilling by 20x in one interpreter test case.  For more typical code,
this is just a 10% speedup of spilling.

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