Author: Fangrui Song Date: 2023-11-09T23:24:51-08:00 New Revision: 50a48d8c26e8a46d2a3ce5ffdda060e851d65dc4
URL: https://github.com/llvm/llvm-project/commit/50a48d8c26e8a46d2a3ce5ffdda060e851d65dc4 DIFF: https://github.com/llvm/llvm-project/commit/50a48d8c26e8a46d2a3ce5ffdda060e851d65dc4.diff LOG: CodeGenPGO: simplify. NFC Added: Modified: clang/lib/CodeGen/CodeGenPGO.cpp Removed: ################################################################################ diff --git a/clang/lib/CodeGen/CodeGenPGO.cpp b/clang/lib/CodeGen/CodeGenPGO.cpp index 7d6c69f22d0e562..81bf8ea696b1647 100644 --- a/clang/lib/CodeGen/CodeGenPGO.cpp +++ b/clang/lib/CodeGen/CodeGenPGO.cpp @@ -954,9 +954,7 @@ CodeGenPGO::applyFunctionAttributes(llvm::IndexedInstrProfReader *PGOReader, void CodeGenPGO::emitCounterIncrement(CGBuilderTy &Builder, const Stmt *S, llvm::Value *StepV) { - if (!CGM.getCodeGenOpts().hasProfileClangInstr() || !RegionCounterMap) - return; - if (!Builder.GetInsertBlock()) + if (!RegionCounterMap || !Builder.GetInsertBlock()) return; unsigned Counter = (*RegionCounterMap)[S]; _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits