aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp
diff options
context:
space:
mode:
authorSanjoy Das <sanjoy@playingwithpointers.com>2015-09-20 18:42:53 +0000
committerSanjoy Das <sanjoy@playingwithpointers.com>2015-09-20 18:42:53 +0000
commit7cc2cfecd9e82e16d94c68fb239d5e78a56d4e63 (patch)
tree84f0e6bd246aaed070b2c4722e69fc73547f285c /llvm/lib/Transforms/Scalar/IndVarSimplify.cpp
parente1e352d5c5faf64acfa10386ac71069601d9df5c (diff)
downloadllvm-7cc2cfecd9e82e16d94c68fb239d5e78a56d4e63.zip
llvm-7cc2cfecd9e82e16d94c68fb239d5e78a56d4e63.tar.gz
llvm-7cc2cfecd9e82e16d94c68fb239d5e78a56d4e63.tar.bz2
[IndVars] Use C++11 style field initialization; NFCI.
llvm-svn: 248131
Diffstat (limited to 'llvm/lib/Transforms/Scalar/IndVarSimplify.cpp')
-rw-r--r--llvm/lib/Transforms/Scalar/IndVarSimplify.cpp21
1 files changed, 7 insertions, 14 deletions
diff --git a/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp b/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp
index bf34141..54b6694 100644
--- a/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp
+++ b/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp
@@ -772,12 +772,9 @@ namespace {
// extend operations. This information is recorded by CollectExtend and provides
// the input to WidenIV.
struct WideIVInfo {
- PHINode *NarrowIV;
- Type *WidestNativeType; // Widest integer type created [sz]ext
- bool IsSigned; // Was a sext user seen before a zext?
-
- WideIVInfo() : NarrowIV(nullptr), WidestNativeType(nullptr),
- IsSigned(false) {}
+ PHINode *NarrowIV = nullptr;
+ Type *WidestNativeType = nullptr; // Widest integer type created [sz]ext
+ bool IsSigned = false; // Was a sext user seen before a zext?
};
}
@@ -828,18 +825,14 @@ namespace {
/// computes the same value as the Narrow IV def. This avoids caching Use*
/// pointers.
struct NarrowIVDefUse {
- Instruction *NarrowDef;
- Instruction *NarrowUse;
- Instruction *WideDef;
+ Instruction *NarrowDef = nullptr;
+ Instruction *NarrowUse = nullptr;
+ Instruction *WideDef = nullptr;
// True if the narrow def is never negative. Tracking this information lets
// us use a sign extension instead of a zero extension or vice versa, when
// profitable and legal.
- bool NeverNegative;
-
- NarrowIVDefUse()
- : NarrowDef(nullptr), NarrowUse(nullptr), WideDef(nullptr),
- NeverNegative(false) {}
+ bool NeverNegative = false;
NarrowIVDefUse(Instruction *ND, Instruction *NU, Instruction *WD,
bool NeverNegative)