[llvm] 0e65d50 - [LTO] runNewPMPasses - remove check for TM != nullptr as we already dereference the pointer directly later on in the same code

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 14 08:31:47 PST 2022


Author: Simon Pilgrim
Date: 2022-01-14T16:31:27Z
New Revision: 0e65d5021aa0aab4fbf67ce0a91abf4467b356a9

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

LOG: [LTO] runNewPMPasses - remove check for TM != nullptr as we already dereference the pointer directly later on in the same code

Added: 
    

Modified: 
    llvm/lib/LTO/LTOBackend.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/LTO/LTOBackend.cpp b/llvm/lib/LTO/LTOBackend.cpp
index 308c60281737a..7694c98483844 100644
--- a/llvm/lib/LTO/LTOBackend.cpp
+++ b/llvm/lib/LTO/LTOBackend.cpp
@@ -229,8 +229,7 @@ static void runNewPMPasses(const Config &Conf, Module &Mod, TargetMachine *TM,
     PGOOpt = PGOOptions("", "", "", PGOOptions::NoAction,
                         PGOOptions::NoCSAction, true);
   }
-  if (TM)
-    TM->setPGOOption(PGOOpt);
+  TM->setPGOOption(PGOOpt);
 
   LoopAnalysisManager LAM;
   FunctionAnalysisManager FAM;


        


More information about the llvm-commits mailing list