aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp
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
commit8d2a43e9beb58c4142ef5e9421017aec8082021c (patch)
tree95fbf9328034d0e907ecd723bb5bd0ac7aa9f59e /clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp
parent0d4ea975ef8b44798c4bcc834dbf6f9b8a2b5f97 (diff)
downloadllvm-8d2a43e9beb58c4142ef5e9421017aec8082021c.zip
llvm-8d2a43e9beb58c4142ef5e9421017aec8082021c.tar.gz
llvm-8d2a43e9beb58c4142ef5e9421017aec8082021c.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. rdar://15547484 llvm-svn: 209049
Diffstat (limited to 'clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions