llvm-project/llvm
Pete Cooper d6e6bf1808 Don't allocate in APInt::slt. NFC.
APInt::slt was copying the LHS and RHS in to temporaries then making
them unsigned so that it could use an unsigned comparision.  It did
this even on the paths which were trivial to give results for, such
as the sign bit of the LHS being set while RHS was not set.

This changes the logic to return out immediately in the trivial cases,
and use an unsigned comparison in the remaining cases.  But this time,
just use the unsigned comparison directly without creating any temporaries.

This works because, for example:
  true = (-2 slt -1) = (0xFE ult 0xFF)

Also added some tests explicitly for slt with APInt's larger than 64-bits
so that this new code is tested.

Using the memory for 'opt -O2 verify-uselistorder.lto.opt.bc -o opt.bc'
(see r236629 for details), this reduces the number of allocations from
26.8M to 23.9M.

llvm-svn: 270881
2016-05-26 17:40:07 +00:00
..
bindings Remove every uses of getGlobalContext() in LLVM (but the C API) 2016-04-14 21:59:01 +00:00
cmake Since some time clang itself figures out the default for ms-compatibility-version and uses it. Trying to figure it out during build is redundant and also will not work when the environment variable VSINSTALLDIR is not defined (which is not defined if you don't install whole Visual Studio but use Visual C++ Build Tools package). 2016-05-26 15:52:23 +00:00
docs [CaptureTracking] Volatile operations capture their memory location 2016-05-26 17:36:22 +00:00
examples [Kaleidoscope][BuildingAJIT] Make the optimizeModule method for Chapter2 2016-05-26 00:24:18 +00:00
include [Orc] Merge some common code for creating CompileCallbackManagers and 2016-05-26 17:20:35 +00:00
lib Don't allocate in APInt::slt. NFC. 2016-05-26 17:40:07 +00:00
projects
resources
test [CaptureTracking] Volatile operations capture their memory location 2016-05-26 17:36:22 +00:00
tools [Orc] Merge some common code for creating CompileCallbackManagers and 2016-05-26 17:20:35 +00:00
unittests Don't allocate in APInt::slt. NFC. 2016-05-26 17:40:07 +00:00
utils Add auto-exporting of symbols from tools so that plugins work on Windows 2016-05-26 11:16:43 +00:00
.arcconfig
.clang-format
.clang-tidy Don't use misc-unused-parameters check on LLVM. 2016-04-13 08:58:52 +00:00
.gitignore
CMakeLists.txt Remove LLVM_ENABLE_TIMESTAMPS 2016-05-05 19:57:03 +00:00
CODE_OWNERS.TXT CODE_OWNERS: Take ownership of SelectionDAG 2016-05-20 19:14:04 +00:00
CREDITS.TXT Update my email address. 2016-05-10 16:23:54 +00:00
LICENSE.TXT
LLVMBuild.txt
README.txt
configure
llvm.spec.in

README.txt

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.