summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/APInt.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2017-03-27 20:07:31 +0000
committerCraig Topper <craig.topper@gmail.com>2017-03-27 20:07:31 +0000
commit6ebeb7041e2294eb429389ea90f2467cb54fb7d5 (patch)
tree6ddad5b791a902be346e01fcf6dac1b89023889b /llvm/lib/Support/APInt.cpp
parent01a633818073ff4b60810a299cfdf3425a653a6b (diff)
downloadbcm5719-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.cpp10
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);
OpenPOWER on IntegriCloud