projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0b8711e
)
[KnownBits] KnownBits::computeForMul - avoid unnecessary APInt copies. NFCI.
author
Simon Pilgrim
<llvm-dev@redking.me.uk>
Wed, 4 Nov 2020 17:15:54 +0000
(17:15 +0000)
committer
Simon Pilgrim
<llvm-dev@redking.me.uk>
Wed, 4 Nov 2020 17:25:25 +0000
(17:25 +0000)
Use const references instead.
llvm/lib/Support/KnownBits.cpp
patch
|
blob
|
history
diff --git
a/llvm/lib/Support/KnownBits.cpp
b/llvm/lib/Support/KnownBits.cpp
index
0c88ca6
..
cce7120
100644
(file)
--- a/
llvm/lib/Support/KnownBits.cpp
+++ b/
llvm/lib/Support/KnownBits.cpp
@@
-280,8
+280,8
@@
KnownBits KnownBits::computeForMul(const KnownBits &LHS, const KnownBits &RHS) {
// Where C5, C6 describe the known bits of %a, %b
// C1, C2 describe the known bottom bits of %a, %b.
// C7 describes the mask of the known bits of the result.
-
APInt
Bottom0 = LHS.One;
-
APInt
Bottom1 = RHS.One;
+
const APInt &
Bottom0 = LHS.One;
+
const APInt &
Bottom1 = RHS.One;
// How many times we'd be able to divide each argument by 2 (shr by 1).
// This gives us the number of trailing zeros on the multiplication result.