aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
diff options
context:
space:
mode:
authorLouis Gerbarg <lgg@apple.com>2014-05-28 17:38:31 +0000
committerLouis Gerbarg <lgg@apple.com>2014-05-28 17:38:31 +0000
commit727f1cbb1770b860df9293563a1c957f47215ec6 (patch)
tree7b703b8b7a2fc91224bb8f9ca006259a10483cdd /llvm/lib/Bitcode/Reader/BitcodeReader.cpp
parentd31b5963ff0433def6c44eb1530a217e7c3a9ed0 (diff)
downloadllvm-727f1cbb1770b860df9293563a1c957f47215ec6.zip
llvm-727f1cbb1770b860df9293563a1c957f47215ec6.tar.gz
llvm-727f1cbb1770b860df9293563a1c957f47215ec6.tar.bz2
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. llvm-svn: 209755
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
0 files changed, 0 insertions, 0 deletions