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:
c06417b
)
extractConstantWithoutWrapping - use const APInt& returned by SCEVConstant::getAPInt()
author
Simon Pilgrim
<llvm-dev@redking.me.uk>
Thu, 9 Jul 2020 16:36:26 +0000
(17:36 +0100)
committer
Simon Pilgrim
<llvm-dev@redking.me.uk>
Fri, 10 Jul 2020 09:24:29 +0000
(10:24 +0100)
Avoids unnecessary APInt copies and silences clang tidy warning.
llvm/lib/Analysis/ScalarEvolution.cpp
patch
|
blob
|
history
diff --git
a/llvm/lib/Analysis/ScalarEvolution.cpp
b/llvm/lib/Analysis/ScalarEvolution.cpp
index
75926aa
..
48c686b
100644
(file)
--- a/
llvm/lib/Analysis/ScalarEvolution.cpp
+++ b/
llvm/lib/Analysis/ScalarEvolution.cpp
@@
-1353,7
+1353,7
@@
bool ScalarEvolution::proveNoWrapByVaryingStart(const SCEV *Start,
static APInt extractConstantWithoutWrapping(ScalarEvolution &SE,
const SCEVConstant *ConstantTerm,
const SCEVAddExpr *WholeAddExpr) {
- const APInt C = ConstantTerm->getAPInt();
+ const APInt
&
C = ConstantTerm->getAPInt();
const unsigned BitWidth = C.getBitWidth();
// Find number of trailing zeros of (x + y + ...) w/o the C first:
uint32_t TZ = BitWidth;