[llvm] r248131 - [IndVars] Use C++11 style field initialization; NFCI.
Sanjoy Das via llvm-commits
llvm-commits at lists.llvm.org
Sun Sep 20 11:42:53 PDT 2015
Author: sanjoy
Date: Sun Sep 20 13:42:53 2015
New Revision: 248131
URL: http://llvm.org/viewvc/llvm-project?rev=248131&view=rev
Log:
[IndVars] Use C++11 style field initialization; NFCI.
Modified:
llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp?rev=248131&r1=248130&r2=248131&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp Sun Sep 20 13:42:53 2015
@@ -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)
More information about the llvm-commits
mailing list