summaryrefslogtreecommitdiff
path: root/lib/Bitcode/Reader/BitcodeReader.cpp
diff options
context:
space:
mode:
authorLouis Gerbarg <lgg@apple.com>2014-05-29 20:29:47 +0000
committerLouis Gerbarg <lgg@apple.com>2014-05-29 20:29:47 +0000
commit78874456fc58ca993635e31ef5ab5517769efb93 (patch)
tree6db8242763d3f6ab8c7eae30d9e347fd01611deb /lib/Bitcode/Reader/BitcodeReader.cpp
parent960fc3503fed972763cbd21ffd03b85ef2e58c82 (diff)
downloadllvm-78874456fc58ca993635e31ef5ab5517769efb93.tar.gz
llvm-78874456fc58ca993635e31ef5ab5517769efb93.tar.bz2
llvm-78874456fc58ca993635e31ef5ab5517769efb93.tar.xz
Add support for combining GEPs across PHI nodes
Currently LLVM will generally merge GEPs. This allows backends to use more complex addressing modes. In some cases this is not happening because there is PHI inbetween the two GEPs: GEP1--\ |-->PHI1-->GEP3 GEP2--/ This patch checks to see if GEP1 and GEP2 are similiar enough that they can be cloned (GEP12) in GEP3's BB, allowing GEP->GEP merging (GEP123): GEP1--\ --\ --\ |-->PHI1-->GEP3 ==> |-->PHI2->GEP12->GEP3 == > |-->PHI2->GEP123 GEP2--/ --/ --/ This also breaks certain use chains that are preventing GEP->GEP merges that the the existing instcombine would merge otherwise. Tests included. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209843 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Bitcode/Reader/BitcodeReader.cpp')
0 files changed, 0 insertions, 0 deletions