Go to file
Tobias Grosser 98b3ee50ff Codegen: Support memory accesses with different types
Every once in a while we see code that accesses memory with different types,
e.g. to perform operations on a piece of memory using type 'float', but to copy
data to this memory using type 'int'. Modeled in C, such codes look like:

    void foo(float A[], float B[]) {
      for (long i = 0; i < 100; i++)
        *(int *)(&A[i]) = *(int *)(&B[i]);
      for (long i = 0; i < 100; i++)
        A[i] += 10;
    }

We already used the correct types during normal operations, but fall back to our
detected type as soon as we import changed memory access functions. For these
memory accesses we may generate invalid IR due to a mismatch between the element
type of the array we detect and the actual type used in the memory access.  To
address this issue, we always cast the newly created address of a memory access
back to the type of the memory access where the address will be used.

llvm-svn: 248781
2015-09-29 06:44:38 +00:00
clang Revert part of r248776. One of the changes worked on my local build, but not on the bots. 2015-09-29 05:08:30 +00:00
clang-tools-extra Fixing a sphinx warning. 2015-09-28 19:27:37 +00:00
compiler-rt [CMake] [Darwin] [builtins] Apply OS and OS-arch filters to cc_kext builtin libraries. 2015-09-28 23:09:46 +00:00
debuginfo-tests New round of fixes for "Always compile debuginfo-tests for the host triple" 2014-10-18 23:47:59 +00:00
libclc Implement tanh builtin 2015-09-29 06:39:09 +00:00
libcxx Fix Typo in GCC no RTTI detection. Fixes PR#24901. Thanks to Bernhard Rosenkraenzer for the report and the patch. 2015-09-22 21:58:30 +00:00
libcxxabi Let cxa_demangle.cpp compile with gcc/libstdc++ 4.8 and clang-cl/MSVC2013's STL. 2015-09-20 18:10:46 +00:00
libunwind unwind: Allow the building of libunwind for MIPS. 2015-09-26 18:26:01 +00:00
lld [ELF2] Add initial MIPS support 2015-09-29 05:34:03 +00:00
lldb Remove one of the three spaces after a period in one of the breakpoint 2015-09-28 23:02:00 +00:00
llgo [llgo] irgen: always use TargetMachine's data layout 2015-09-25 06:28:14 +00:00
llvm [LoopUnswitch] Add block frequency analysis to recognize hot/cold regions 2015-09-29 05:03:32 +00:00
openmp Fix memory corruption in Windows debug library 2015-09-25 17:23:17 +00:00
polly Codegen: Support memory accesses with different types 2015-09-29 06:44:38 +00:00