LLVM backend for 6502
Go to file
Chandler Carruth e1a5243053 Fix a really nasty SROA bug with how we handled out-of-bounds memcpy
intrinsics.

Reported on the list by Evan with a couple of attempts to fix, but it
took a while to dig down to the root cause. There are two overlapping
bugs here, both centering around the circumstance of discovering
a memcpy operand which is known to be completely outside the bounds of
the alloca.

First, we need to kill the *other* side of the memcpy if it was added to
this alloca. Otherwise we'll factor it into our slicing and try to
rewrite it even though we know for a fact that it is dead. This is made
more tricky because we can visit the sides in either order. So we have
to both kill the other side and skip instructions marked as dead. The
latter really should be goodness in every case, but here is a matter of
correctness.

Second, we need to actually remove the *uses* of the alloca by the
memcpy when queuing it for later deletion. Otherwise it may still be
using the alloca when we go to promote it (if the rewrite re-uses the
existing alloca instruction). Do this by factoring out the
use-clobbering used when for nixing a Phi argument and re-using it
across the operands of a to-be-deleted instruction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199590 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-19 12:16:54 +00:00
autoconf Use a heavier hammer when --enable-libcpp is passed to bypass the tests 2014-01-15 21:21:48 +00:00
bindings Makefile.ocaml: Tweak to use --system-libs. 2013-12-20 00:36:59 +00:00
cmake Add the test for libstdc++ versions newer than 4.6 so we don't 2014-01-17 09:47:55 +00:00
docs Add an inalloca flag to allocas 2014-01-17 23:58:17 +00:00
examples [cleanup] Re-sort the examples #include lines with my sort_includes 2014-01-13 09:58:03 +00:00
include ARM: update build attributes for ABI r2.09 2014-01-19 08:25:35 +00:00
lib Fix a really nasty SROA bug with how we handled out-of-bounds memcpy 2014-01-19 12:16:54 +00:00
projects
test Fix a really nasty SROA bug with how we handled out-of-bounds memcpy 2014-01-19 12:16:54 +00:00
tools [PM] Make the verifier work independently of any pass manager. 2014-01-19 02:22:18 +00:00
unittests [PM] Make the verifier work independently of any pass manager. 2014-01-19 02:22:18 +00:00
utils Allow x86 mov instructions to/from memory with absolute address to be encoded and disassembled with a segment override prefix. Fixes PR16962. 2014-01-16 07:36:58 +00:00
.arcconfig
.clang-format
.gitignore
CMakeLists.txt Factor the option and checking of compiler version better. Put the 2014-01-13 22:21:34 +00:00
CODE_OWNERS.TXT Update email address. 2013-12-04 09:42:49 +00:00
configure Use a heavier hammer when --enable-libcpp is passed to bypass the tests 2014-01-15 21:21:48 +00:00
CREDITS.TXT Fix documentation typos 2013-12-20 00:33:39 +00:00
LICENSE.TXT Update the copyright credits -- Happy new year 2014! 2014-01-01 08:27:31 +00:00
llvm.spec.in
LLVMBuild.txt
Makefile Fix bad variable syntax in r199413 2014-01-17 00:40:39 +00:00
Makefile.common
Makefile.config.in
Makefile.rules [Mips]Work around MIPS linker issues exposed by commit r198087 until bug 18360 is resolved 2014-01-03 22:18:43 +00:00
README.txt

Low Level Virtual Machine (LLVM)
================================

This directory and its subdirectories contain source code for the Low Level
Virtual Machine, a toolkit for the construction of highly optimized compilers,
optimizers, and runtime environments.

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.

Please see the documentation provided in docs/ for further
assistance with LLVM, and in particular docs/GettingStarted.rst for getting
started with LLVM and docs/README.txt for an overview of LLVM's
documentation setup.

If you're writing a package for LLVM, see docs/Packaging.rst for our
suggestions.