summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorLouis Gerbarg <lgg@apple.com>2014-05-16 23:47:24 +0000
committerLouis Gerbarg <lgg@apple.com>2014-05-16 23:47:24 +0000
commit2d1fa5f718bc53d9b3867371f0941889f02bea3a (patch)
treeff672dd442ac8aceac84e3a26731fad2997c58d5 /tools
parent70f8b47a650897f7483f7dbb0b1bc3888350dbc3 (diff)
downloadllvm-2d1fa5f718bc53d9b3867371f0941889f02bea3a.tar.gz
llvm-2d1fa5f718bc53d9b3867371f0941889f02bea3a.tar.bz2
llvm-2d1fa5f718bc53d9b3867371f0941889f02bea3a.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. rdar://15547484 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209049 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions