1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-25 14:02:52 +02:00
llvm-mirror/lib/Transforms
Louis Gerbarg 55c91dae6c 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
2014-05-28 17:38:31 +00:00
..
Hello [Modules] Fix potential ODR violations by sinking the DEBUG_TYPE 2014-04-22 02:55:47 +00:00
InstCombine Add support for combining GEPs across PHI nodes 2014-05-28 17:38:31 +00:00
Instrumentation [asancov] Don't emit extra runtime calls when compiling without coverage. 2014-05-28 09:26:46 +00:00
IPO Add an extension point for peephole optimizers. 2014-05-25 10:27:02 +00:00
ObjCARC Add comdat key field to llvm.global_ctors and llvm.global_dtors 2014-05-16 20:39:27 +00:00
Scalar Distribute sext/zext to the operands of and/or/xor 2014-05-27 18:00:00 +00:00
Utils Add support for missed and analysis optimization remarks. 2014-05-22 14:19:46 +00:00
Vectorize Add support for missed and analysis optimization remarks. 2014-05-22 14:19:46 +00:00
CMakeLists.txt
LLVMBuild.txt
Makefile