LLVM backend for 6502
Go to file
Meador Inge a241b58f8d instcombine: Don't replace all uses for instructions with no uses
My commit to migrate the printf simplifiers from the simplify-libcalls
in r168604 introduced a regression reported by Duncan [1].  The problem
is that in some cases the library call simplifier can return a new value
that has no uses and the new value's type is different than the old value's
type (which is fine because there are no uses).  The specific case that
triggered the bug looked something like:

   declare void @printf(i8*, ...)
   ...
   call void (i8*, ...)* @printf(i8* %fmt)

Which we want to optimized into:

   call i32 @putchar(i32 104)

However, the code was attempting to replace all uses of the printf with
the putchar and the types differ, hence a crash.  This is fixed by *just*
deleting the original instruction when there are no uses.  The old
simplify-libcalls pass is already doing something similar.

[1] http://lists.cs.uiuc.edu/pipermail/llvmdev/2012-November/056338.html

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168716 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-27 18:52:49 +00:00
autoconf
bindings [python] fix get_library() 2012-11-20 22:27:55 +00:00
cmake Removing SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG 2012-11-26 02:02:08 +00:00
docs Fast-math flags documentation added to LangRef 2012-11-27 00:48:29 +00:00
examples Fix gcc's -Wunused-but-set-variable warnings. 2012-11-26 00:56:44 +00:00
include Test commit only modifying comments 2012-11-27 17:39:20 +00:00
lib instcombine: Don't replace all uses for instructions with no uses 2012-11-27 18:52:49 +00:00
projects Add ENABLE_CXX11 and ENABLE_WERROR to Makefile.llvm.rules for sample project. They were previously added to Makefile.llvm.config.in but the consumption was missing 2012-11-27 08:12:24 +00:00
runtime
test instcombine: Don't replace all uses for instructions with no uses 2012-11-27 18:52:49 +00:00
tools Remove the dependent libraries feature. 2012-11-27 09:55:56 +00:00
unittests Allow using MemoryBuffers with yaml::Stream directly. 2012-11-19 23:21:47 +00:00
utils Generalize matching of add_executable to add_XXX_executable. 2012-11-22 07:48:52 +00:00
.gitignore
CMakeLists.txt
CODE_OWNERS.TXT Remove some Clang-specific ownership roles. 2012-11-27 00:48:36 +00:00
configure
CREDITS.TXT
LICENSE.TXT
llvm.spec.in
LLVMBuild.txt
Makefile
Makefile.common
Makefile.config.in
Makefile.rules
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 HTML documentation provided in docs/index.html for further
assistance with LLVM.

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