llvm/unittests
Craig Topper 73046581a3 [APInt] Add setLowBits/setHighBits methods to APInt.
Summary:
There are quite a few places in the code base that do something like the following to set the high or low bits in an APInt.

KnownZero |= APInt::getHighBitsSet(BitWidth, BitWidth - 1);

For BitWidths larger than 64 this creates a short lived APInt with malloced storage. I think it might even call malloc twice. Its better to just provide methods that can set the necessary bits without the temporary APInt.

I'll update usages that benefit in a separate patch.

Reviewers: majnemer, MatzeB, davide, RKSimon, hans

Reviewed By: hans

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297111 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-07 01:56:01 +00:00
..
ADT [APInt] Add setLowBits/setHighBits methods to APInt. 2017-03-07 01:56:01 +00:00
Analysis [SCEV] Decrease the recursion threshold for CompareValueComplexity 2017-03-05 23:49:17 +00:00
AsmParser
Bitcode Reapply "Make BitCodeAbbrev ownership explicit using shared_ptr rather than IntrusiveRefCntPtr"" 2017-01-04 22:36:33 +00:00
CodeGen Revert r296474 - [globalisel] Change LLT constructor string into an LLT subclass that knows how to generate it. 2017-02-28 15:00:27 +00:00
DebugInfo [DWARF] NFC. A few bits of minor code cleanup. 2017-03-06 19:25:07 +00:00
ExecutionEngine [Orc][RPC] Accept both const char* and char* arguments for string serialization. 2017-02-24 20:56:43 +00:00
IR [IR] Add range accessors for the indices of a GEP instruction. 2017-02-28 08:04:20 +00:00
LineEditor
Linker Implement intrinsic mangling for literal struct types. 2017-02-15 23:16:20 +00:00
MC Fix static initialization order fiasco in MCTests 2016-11-11 22:18:42 +00:00
MI Test if we can use raw strings on all platforms compiling LLVM. 2017-02-23 01:09:01 +00:00
Object Fix unittest for buildbot with mips host (32bit big endian) from r295174 2017-02-15 16:03:22 +00:00
ObjectYAML
Option
ProfileData Fix spelling mistakes in Tools/Tests comments. NFC. 2016-11-20 13:31:13 +00:00
Support [Support] Move Stream library from MSF -> Support. 2017-03-02 20:52:51 +00:00
Target Remove a FIXME that I forgot about. NFC. 2016-10-13 05:28:55 +00:00
Transforms Move updating functions to MemorySSAUpdater. 2017-02-22 22:19:55 +00:00
XRay [XRay][graph] Disambiguate name of type from member name 2017-02-10 06:59:25 +00:00
CMakeLists.txt [XRay] A graph Class for the llvm-xray graph 2017-02-10 06:36:08 +00:00