diff options
author | Craig Topper <craig.topper@gmail.com> | 2017-03-07 01:56:01 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2017-03-07 01:56:01 +0000 |
commit | bafdd03b55b1d770dc13f3fb04d398d00480a260 (patch) | |
tree | 2f270bf2f5821a06a05420d6cc2f44a0c871b09c /lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h | |
parent | 00c7592a6b67b746f64df8863a7318dcbf822e6c (diff) | |
download | bcm5719-llvm-bafdd03b55b1d770dc13f3fb04d398d00480a260.tar.gz bcm5719-llvm-bafdd03b55b1d770dc13f3fb04d398d00480a260.zip |
[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
llvm-svn: 297111
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h')
0 files changed, 0 insertions, 0 deletions