LLVM backend for 6502
Go to file
Duncan Sands 593faa53fa My auto-simplifier noticed that ((X/Y)*Y)/Y occurs several times in SPEC
benchmarks, and that it can be simplified to X/Y.  (In general you can only
simplify (Z*Y)/Y to Z if the multiplication did not overflow; if Z has the
form "X/Y" then this is the case).  This patch implements that transform and
moves some Div logic out of instcombine and into InstructionSimplify.
Unfortunately instcombine gets in the way somewhat, since it likes to change
(X/Y)*Y into X-(X rem Y), so I had to teach instcombine about this too.
Finally, thanks to the NSW/NUW flags, sometimes we know directly that "Z*Y"
does not overflow, because the flag says so, so I added that logic too.  This
eliminates a bunch of divisions and subtractions in 447.dealII, and has good
effects on some other benchmarks too.  It seems to have quite an effect on
tramp3d-v4 but it's hard to say if it's good or bad because inlining decisions
changed, resulting in massive changes all over.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124487 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-28 16:51:11 +00:00
autoconf autoconf: Add --disable-embed-stdcxx to suppress linking libstdc++.a into llvm.dll with --enable-shared on Cygming. 2010-12-29 03:59:14 +00:00
bindings Fix OCaml bindings crash, PR8847. 2010-12-23 15:49:26 +00:00
cmake Don't show -pedantic, -W and -Wall on the output of 2011-01-27 19:29:48 +00:00
docs Handles libffi on the CMake build. 2011-01-21 15:42:54 +00:00
examples Do not re-test for the existence of pthread.h. 2010-12-23 21:27:22 +00:00
include My auto-simplifier noticed that ((X/Y)*Y)/Y occurs several times in SPEC 2011-01-28 16:51:11 +00:00
lib My auto-simplifier noticed that ((X/Y)*Y)/Y occurs several times in SPEC 2011-01-28 16:51:11 +00:00
projects Regen configure 2010-12-12 21:42:01 +00:00
runtime
test My auto-simplifier noticed that ((X/Y)*Y)/Y occurs several times in SPEC 2011-01-28 16:51:11 +00:00
tools Don't show -pedantic, -W and -Wall on the output of 2011-01-27 19:29:48 +00:00
unittests Don't infinitely recurse! Patch by Marius Wachtler! 2011-01-27 07:35:27 +00:00
utils Fix a comment typo. 2011-01-27 23:08:52 +00:00
website
.gitignore Cleanup and document .gitignore. 2010-12-17 17:22:50 +00:00
build-for-llvm-top.sh
CMakeLists.txt Handles libffi on the CMake build. 2011-01-21 15:42:54 +00:00
configure autoconf: Add --disable-embed-stdcxx to suppress linking libstdc++.a into llvm.dll with --enable-shared on Cygming. 2010-12-29 03:59:14 +00:00
CREDITS.TXT
LICENSE.TXT
llvm.spec.in
Makefile
Makefile.common
Makefile.config.in autoconf: Add --disable-embed-stdcxx to suppress linking libstdc++.a into llvm.dll with --enable-shared on Cygming. 2010-12-29 03:59:14 +00:00
Makefile.rules
ModuleInfo.txt
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.