hanchenye-llvm-project/llvm
Simon Pilgrim b02667c469 [APInt] Add APInt::insertBits() method to insert an APInt into a larger APInt
We currently have to insert bits via a temporary variable of the same size as the target with various shift/mask stages, resulting in further temporary variables, all of which require the allocation of memory for large APInts (MaskSizeInBits > 64).

This is another of the compile time issues identified in PR32037 (see also D30265).

This patch adds the APInt::insertBits() helper method which avoids the temporary memory allocation and masks/inserts the raw bits directly into the target.

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

llvm-svn: 297458
2017-03-10 13:44:32 +00:00
..
bindings [DebugInfo] Emit address space with DW_AT_address_class attribute for pointer and reference types 2017-03-08 23:55:44 +00:00
cmake CMake: Don't install llvm-tblgen twice 2017-03-09 19:24:07 +00:00
docs [FileCheck] Added --enable-var-scope option to enable scope for regex variables. 2017-03-09 17:59:04 +00:00
examples llvm/examples/Kaleidoscope/BuildingAJIT: More fixup corresponding to r295636. 2017-02-20 10:07:41 +00:00
include [APInt] Add APInt::insertBits() method to insert an APInt into a larger APInt 2017-03-10 13:44:32 +00:00
lib [APInt] Add APInt::insertBits() method to insert an APInt into a larger APInt 2017-03-10 13:44:32 +00:00
projects [cmake] Include openmp with add_llvm_external_project 2017-03-07 18:54:17 +00:00
resources
runtimes
test [mips][msa] Accept more values for constant splats 2017-03-10 13:27:14 +00:00
tools [llvm-readobj] Support SHT_MIPS_DWARF section type flag 2017-03-10 08:22:25 +00:00
unittests [APInt] Add APInt::insertBits() method to insert an APInt into a larger APInt 2017-03-10 13:44:32 +00:00
utils [FileCheck] Added --enable-var-scope option to enable scope for regex variables. 2017-03-09 17:59:04 +00:00
.arcconfig
.clang-format
.clang-tidy
.gitignore [.gitignore] Update .gitignore to ignore a nested build directory 2017-02-24 23:09:30 +00:00
CMakeLists.txt remove Cmake option for LLVM_DISABLE_ABI_BREAKING_CHECKS_ENFORCING 2017-03-07 00:51:07 +00:00
CODE_OWNERS.TXT Collapse my two entries in CODE_OWNERS.txt 2017-02-15 23:45:21 +00:00
CREDITS.TXT
LICENSE.TXT
LLVMBuild.txt
README.txt Test commit. Added a blank line. 2017-03-06 20:45:33 +00:00
RELEASE_TESTERS.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.