1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-23 13:02:52 +02:00
Go to file
Chandler Carruth 87057f138b [LIR] Teach LIR to avoid extending the BE count prior to adding one to
it when safe.

Very often the BE count is the trip count minus one, and the plus one
here should fold with that minus one. But because the BE count might in
theory be UINT_MAX or some such, adding one before we extend could in
some cases wrap to zero and break when we scale things.

This patch checks to see if it would be safe to add one because the
specific case that would cause this is guarded for prior to entering the
preheader. This should handle essentially all of the common loop idioms
coming out of C/C++ code once canonicalized by LLVM.

Before this patch, both forms of loop in the added test cases ended up
subtracting one from the size, extending it, scaling it up by 8 and then
adding 8 back onto it. This is really silly, and it turns out made it
all the way into generated code very often, so this is a surprisingly
important cleanup to do.

Many thanks to Sanjoy for showing me how to do this with SCEV.

Differential Revision: https://reviews.llvm.org/D35758

llvm-svn: 308968
2017-07-25 10:48:32 +00:00
bindings [NFC] Remove multiple semicolons 2017-06-28 23:15:16 +00:00
cmake Remove Bitrig: LLVM Changes 2017-07-21 22:48:47 +00:00
docs [libFuzzer] enable reduce_inputs=1 by default (seems to be a big win usually) 2017-07-19 22:10:30 +00:00
examples Defeat another -Wunused-but-set-variable warning 2017-07-19 15:06:31 +00:00
include This patch enables the usage of constant Enum identifiers within Microsoft style inline assembly statements. 2017-07-25 10:44:09 +00:00
lib [LIR] Teach LIR to avoid extending the BE count prior to adding one to 2017-07-25 10:48:32 +00:00
projects Add temporary workaround to allow in-tree libc++ builds on Windows 2017-05-11 01:44:30 +00:00
resources
runtimes [CMake] Remove redundant logic in runtimes/CMakeList.txt 2017-07-24 17:26:28 +00:00
test [LIR] Teach LIR to avoid extending the BE count prior to adding one to 2017-07-25 10:48:32 +00:00
tools llvm-rc: Fixup for r308940. This should use LLVMSupport. 2017-07-25 00:51:40 +00:00
unittests Remove some leftover DWARFContextInMemory. 2017-07-19 23:34:59 +00:00
utils test-release.sh: Fix phase2 and phase3 binary comparision 2017-07-24 19:28:30 +00:00
.arcconfig
.clang-format
.clang-tidy
.gitignore gitignore: Ignore .vs folder (VS2017 config files) 2017-04-08 00:16:58 +00:00
CMakeLists.txt [Modules] Rework r274270. Let Clang targets depend on intrinsics_gen. 2017-07-23 05:09:44 +00:00
CODE_OWNERS.TXT Remove the BBVectorize pass. 2017-06-30 07:09:08 +00:00
configure
CREDITS.TXT Another test commit 2017-07-01 03:24:06 +00:00
LICENSE.TXT
llvm.spec.in
LLVMBuild.txt
README.txt Test commit. Added a blank line. 2017-03-06 20:45:33 +00:00
RELEASE_TESTERS.TXT [RelTest] Diana is doing both releases now 2017-07-14 08:33:52 +00:00

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

This directory and its subdirectories contain source code for LLVM,
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 are writing a package for LLVM, see docs/Packaging.rst for our
suggestions.