[llvm] c18df1e - Fix uninitialized variable warnings. NFCI.

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 6 03:19:33 PDT 2021


Author: Simon Pilgrim
Date: 2021-06-06T11:09:55+01:00
New Revision: c18df1e1569c8a0ecfd89c9879332f5c6bb95bf9

URL: https://github.com/llvm/llvm-project/commit/c18df1e1569c8a0ecfd89c9879332f5c6bb95bf9
DIFF: https://github.com/llvm/llvm-project/commit/c18df1e1569c8a0ecfd89c9879332f5c6bb95bf9.diff

LOG: Fix uninitialized variable warnings. NFCI.

Added: 
    

Modified: 
    llvm/include/llvm/Transforms/IPO/IROutliner.h

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/Transforms/IPO/IROutliner.h b/llvm/include/llvm/Transforms/IPO/IROutliner.h
index eefcbe5235c16..442a8ec1d2e28 100644
--- a/llvm/include/llvm/Transforms/IPO/IROutliner.h
+++ b/llvm/include/llvm/Transforms/IPO/IROutliner.h
@@ -63,7 +63,7 @@ class OptimizationRemarkEmitter;
 /// mapping from the extracted function arguments to overall function arguments.
 struct OutlinableRegion {
   /// Describes the region of code.
-  IRSimilarityCandidate *Candidate;
+  IRSimilarityCandidate *Candidate = nullptr;
 
   /// If this region is outlined, the front and back IRInstructionData could
   /// potentially become invalidated if the only new instruction is a call.
@@ -72,11 +72,11 @@ struct OutlinableRegion {
   IRInstructionData *NewBack = nullptr;
 
   /// The number of extracted inputs from the CodeExtractor.
-  unsigned NumExtractedInputs;
+  unsigned NumExtractedInputs = 0;
 
   /// The corresponding BasicBlock with the appropriate stores for this
   /// OutlinableRegion in the overall function.
-  unsigned OutputBlockNum;
+  unsigned OutputBlockNum = -1;
 
   /// Mapping the extracted argument number to the argument number in the
   /// overall function.  Since there will be inputs, such as elevated constants


        


More information about the llvm-commits mailing list