forked from OSchip/llvm-project
[GVN] Fix uninitialized variable warnings. NFCI.
This commit is contained in:
parent
1842fe6be3
commit
77debf51ab
|
@ -94,7 +94,7 @@ public:
|
|||
// value number to the index of Expression in Expressions. We use it
|
||||
// instead of a DenseMap because filling such mapping is faster than
|
||||
// filling a DenseMap and the compile time is a little better.
|
||||
uint32_t nextExprNumber;
|
||||
uint32_t nextExprNumber = 0;
|
||||
|
||||
std::vector<Expression> Expressions;
|
||||
std::vector<uint32_t> ExprIdx;
|
||||
|
@ -107,9 +107,9 @@ public:
|
|||
DenseMap<std::pair<uint32_t, const BasicBlock *>, uint32_t>;
|
||||
PhiTranslateMap PhiTranslateTable;
|
||||
|
||||
AliasAnalysis *AA;
|
||||
MemoryDependenceResults *MD;
|
||||
DominatorTree *DT;
|
||||
AliasAnalysis *AA = nullptr;
|
||||
MemoryDependenceResults *MD = nullptr;
|
||||
DominatorTree *DT = nullptr;
|
||||
|
||||
uint32_t nextValueNumber = 1;
|
||||
|
||||
|
@ -155,14 +155,14 @@ private:
|
|||
friend class gvn::GVNLegacyPass;
|
||||
friend struct DenseMapInfo<Expression>;
|
||||
|
||||
MemoryDependenceResults *MD;
|
||||
DominatorTree *DT;
|
||||
const TargetLibraryInfo *TLI;
|
||||
AssumptionCache *AC;
|
||||
MemoryDependenceResults *MD = nullptr;
|
||||
DominatorTree *DT = nullptr;
|
||||
const TargetLibraryInfo *TLI = nullptr;
|
||||
AssumptionCache *AC = nullptr;
|
||||
SetVector<BasicBlock *> DeadBlocks;
|
||||
OptimizationRemarkEmitter *ORE;
|
||||
ImplicitControlFlowTracking *ICF;
|
||||
LoopInfo *LI;
|
||||
OptimizationRemarkEmitter *ORE = nullptr;
|
||||
ImplicitControlFlowTracking *ICF = nullptr;
|
||||
LoopInfo *LI = nullptr;
|
||||
|
||||
ValueTable VN;
|
||||
|
||||
|
|
|
@ -112,7 +112,7 @@ static cl::opt<uint32_t> MaxNumDeps(
|
|||
|
||||
struct llvm::GVN::Expression {
|
||||
uint32_t opcode;
|
||||
Type *type;
|
||||
Type *type = nullptr;
|
||||
bool commutative = false;
|
||||
SmallVector<uint32_t, 4> varargs;
|
||||
|
||||
|
@ -173,7 +173,7 @@ struct llvm::gvn::AvailableValue {
|
|||
PointerIntPair<Value *, 2, ValType> Val;
|
||||
|
||||
/// Offset - The byte offset in Val that is interesting for the load query.
|
||||
unsigned Offset;
|
||||
unsigned Offset = 0;
|
||||
|
||||
static AvailableValue get(Value *V, unsigned Offset = 0) {
|
||||
AvailableValue Res;
|
||||
|
@ -237,7 +237,7 @@ struct llvm::gvn::AvailableValue {
|
|||
/// the associated BasicBlock.
|
||||
struct llvm::gvn::AvailableValueInBlock {
|
||||
/// BB - The basic block in question.
|
||||
BasicBlock *BB;
|
||||
BasicBlock *BB = nullptr;
|
||||
|
||||
/// AV - The actual available value
|
||||
AvailableValue AV;
|
||||
|
|
|
@ -489,11 +489,11 @@ namespace {
|
|||
|
||||
class NewGVN {
|
||||
Function &F;
|
||||
DominatorTree *DT;
|
||||
const TargetLibraryInfo *TLI;
|
||||
AliasAnalysis *AA;
|
||||
MemorySSA *MSSA;
|
||||
MemorySSAWalker *MSSAWalker;
|
||||
DominatorTree *DT = nullptr;
|
||||
const TargetLibraryInfo *TLI = nullptr;
|
||||
AliasAnalysis *AA = nullptr;
|
||||
MemorySSA *MSSA = nullptr;
|
||||
MemorySSAWalker *MSSAWalker = nullptr;
|
||||
const DataLayout &DL;
|
||||
std::unique_ptr<PredicateInfo> PredInfo;
|
||||
|
||||
|
@ -505,7 +505,7 @@ class NewGVN {
|
|||
const SimplifyQuery SQ;
|
||||
|
||||
// Number of function arguments, used by ranking
|
||||
unsigned int NumFuncArgs;
|
||||
unsigned int NumFuncArgs = 0;
|
||||
|
||||
// RPOOrdering of basic blocks
|
||||
DenseMap<const DomTreeNode *, unsigned> RPOOrdering;
|
||||
|
@ -516,9 +516,9 @@ class NewGVN {
|
|||
// startsout in, and represents any value. Being an optimistic analysis,
|
||||
// anything in the TOP class has the value TOP, which is indeterminate and
|
||||
// equivalent to everything.
|
||||
CongruenceClass *TOPClass;
|
||||
CongruenceClass *TOPClass = nullptr;
|
||||
std::vector<CongruenceClass *> CongruenceClasses;
|
||||
unsigned NextCongruenceNum;
|
||||
unsigned NextCongruenceNum = 0;
|
||||
|
||||
// Value Mappings.
|
||||
DenseMap<Value *, CongruenceClass *> ValueToClass;
|
||||
|
@ -862,7 +862,7 @@ private:
|
|||
|
||||
// Debug counter info. When verifying, we have to reset the value numbering
|
||||
// debug counter to the same state it started in to get the same results.
|
||||
int64_t StartingVNCounter;
|
||||
int64_t StartingVNCounter = 0;
|
||||
};
|
||||
|
||||
} // end anonymous namespace
|
||||
|
|
Loading…
Reference in New Issue