diff options
author | Akshay Khadse <akshayskhadse@gmail.com> | 2023-04-17 16:16:23 +0800 |
---|---|---|
committer | Luo, Yuanke <yuanke.luo@intel.com> | 2023-04-17 16:32:46 +0800 |
commit | 8bf7f86d7966ff835967669fb6bf23897e20b71d (patch) | |
tree | ac732355d5e16c7444bcf1a20c59ed65bcdab7c2 /llvm/lib/CodeGen/CodeGenPrepare.cpp | |
parent | 83ab5708d1d00f4ec2541e960bff3b5c68001c9e (diff) | |
download | llvm-8bf7f86d7966ff835967669fb6bf23897e20b71d.zip llvm-8bf7f86d7966ff835967669fb6bf23897e20b71d.tar.gz llvm-8bf7f86d7966ff835967669fb6bf23897e20b71d.tar.bz2 |
Fix uninitialized pointer members in CodeGen
This change initializes the members TSI, LI, DT, PSI, and ORE pointer feilds of the SelectOptimize class to nullptr.
Reviewed By: LuoYuanke
Differential Revision: https://reviews.llvm.org/D148303
Diffstat (limited to 'llvm/lib/CodeGen/CodeGenPrepare.cpp')
-rw-r--r-- | llvm/lib/CodeGen/CodeGenPrepare.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/CodeGenPrepare.cpp b/llvm/lib/CodeGen/CodeGenPrepare.cpp index bd00c9f..62253e6 100644 --- a/llvm/lib/CodeGen/CodeGenPrepare.cpp +++ b/llvm/lib/CodeGen/CodeGenPrepare.cpp @@ -298,16 +298,16 @@ class TypePromotionTransaction; class CodeGenPrepare : public FunctionPass { const TargetMachine *TM = nullptr; - const TargetSubtargetInfo *SubtargetInfo; + const TargetSubtargetInfo *SubtargetInfo = nullptr; const TargetLowering *TLI = nullptr; - const TargetRegisterInfo *TRI; + const TargetRegisterInfo *TRI = nullptr; const TargetTransformInfo *TTI = nullptr; const BasicBlockSectionsProfileReader *BBSectionsProfileReader = nullptr; - const TargetLibraryInfo *TLInfo; - const LoopInfo *LI; + const TargetLibraryInfo *TLInfo = nullptr; + const LoopInfo *LI = nullptr; std::unique_ptr<BlockFrequencyInfo> BFI; std::unique_ptr<BranchProbabilityInfo> BPI; - ProfileSummaryInfo *PSI; + ProfileSummaryInfo *PSI = nullptr; /// As we scan instructions optimizing them, this is the next instruction /// to optimize. Transforms that can invalidate this should update it. |