Place the GEP instructions nearer to the instructions which use them.
authorBill Wendling <isanbard@gmail.com>
Fri, 27 Jan 2012 02:02:24 +0000 (02:02 +0000)
committerBill Wendling <isanbard@gmail.com>
Fri, 27 Jan 2012 02:02:24 +0000 (02:02 +0000)
commit4cc4666268c6c62de763c46fefe304adf08a01a1
tree518e69bd700b6d36c5ef97f87a11f0cb259852b6
parent6b2760759b23b8b96beb43966b9b8088e832efc7
Place the GEP instructions nearer to the instructions which use them.

GEP instructions are there for the compiler and shouldn't really output much
code (if any at all). When a GEP is stored in the entry block, Fast ISel (for
one) will not know that it could fold it into further uses. For instance, inside
of the EH handling code. This results in a lot of unnecessary spills and loads
which bloat code and slows down pretty much everything.
<rdar://problem/10694814>

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