llvm-6502/lib
Louis Gerbarg 78874456fc 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
2014-05-29 20:29:47 +00:00
..
Analysis implement missing SCEVDivision case 2014-05-29 19:44:09 +00:00
AsmParser [pr19844] Add thread local mode to aliases. 2014-05-28 18:15:43 +00:00
Bitcode [pr19844] Add thread local mode to aliases. 2014-05-28 18:15:43 +00:00
CodeGen Debug Info: Remove unused code. The MInsn of an _abstract_ variable is 2014-05-29 16:56:48 +00:00
DebugInfo [modules] Add module maps for LLVM. These are not quite ready for prime-time 2014-05-21 02:46:14 +00:00
ExecutionEngine AArch64/ARM64: move ARM64 into AArch64's place 2014-05-24 12:50:23 +00:00
IR [pr19844] Add thread local mode to aliases. 2014-05-28 18:15:43 +00:00
IRReader [C++11] More 'nullptr' conversion. In some cases just using a boolean check instead of comparing to nullptr. 2014-04-15 06:32:26 +00:00
LineEditor [CMake] Use LINK_LIBS instead of target_link_libraries(). 2014-02-26 06:41:29 +00:00
Linker Use create methods since msvc doesn't handle delegating constructors. 2014-05-17 21:29:57 +00:00
LTO AArch64/ARM64: move ARM64 into AArch64's place 2014-05-24 12:50:23 +00:00
MC [mips][mips64r6] Add Relocations R_MIPS_PCHI16, R_MIPS_PCLO16 2014-05-27 14:58:51 +00:00
Object [elf2yaml][ELF] Move Info field to the RelocationSection structure. This 2014-05-29 11:05:31 +00:00
Option Options: Use erase_if to remove Args from the list. 2014-05-18 15:14:13 +00:00
ProfileData ProfileData: Allow multiple profiles in RawInstrProfReader 2014-05-16 00:38:00 +00:00
Support Fixup sys::getHostCPUFeatures crypto names so it doesn't clash with kernel headers 2014-05-23 10:14:13 +00:00
TableGen [modules] Add module maps for LLVM. These are not quite ready for prime-time 2014-05-21 02:46:14 +00:00
Target [PPC] Use alias symbols in address computation. 2014-05-29 15:41:38 +00:00
Transforms Add support for combining GEPs across PHI nodes 2014-05-29 20:29:47 +00:00
CMakeLists.txt ProfileData: Introduce the InstrProfReader interface and a text reader 2014-03-21 17:24:48 +00:00
LLVMBuild.txt ProfileData: Introduce the InstrProfReader interface and a text reader 2014-03-21 17:24:48 +00:00
Makefile ProfileData: Introduce the InstrProfReader interface and a text reader 2014-03-21 17:24:48 +00:00