diff options
author | Craig Topper <craig.topper@gmail.com> | 2017-03-27 20:07:31 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2017-03-27 20:07:31 +0000 |
commit | 6ebeb7041e2294eb429389ea90f2467cb54fb7d5 (patch) | |
tree | 6ddad5b791a902be346e01fcf6dac1b89023889b /llvm/lib/Support/APInt.cpp | |
parent | 01a633818073ff4b60810a299cfdf3425a653a6b (diff) | |
download | bcm5719-llvm-6ebeb7041e2294eb429389ea90f2467cb54fb7d5.tar.gz bcm5719-llvm-6ebeb7041e2294eb429389ea90f2467cb54fb7d5.zip |
[APInt] Move operator=(uint64_t) inline as its pretty simple and is often used with small constants that the compiler can optimize.
While there recognize that we only need to clearUnusedBits on the single word case.
llvm-svn: 298881
Diffstat (limited to 'llvm/lib/Support/APInt.cpp')
-rw-r--r-- | llvm/lib/Support/APInt.cpp | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/llvm/lib/Support/APInt.cpp b/llvm/lib/Support/APInt.cpp index ebcbb151867..f2c3a2db30c 100644 --- a/llvm/lib/Support/APInt.cpp +++ b/llvm/lib/Support/APInt.cpp @@ -157,16 +157,6 @@ APInt& APInt::AssignSlowCase(const APInt& RHS) { return clearUnusedBits(); } -APInt& APInt::operator=(uint64_t RHS) { - if (isSingleWord()) - VAL = RHS; - else { - pVal[0] = RHS; - memset(pVal+1, 0, (getNumWords() - 1) * APINT_WORD_SIZE); - } - return clearUnusedBits(); -} - /// This method 'profiles' an APInt for use with FoldingSet. void APInt::Profile(FoldingSetNodeID& ID) const { ID.AddInteger(BitWidth); |