[PATCH] D124490: [InstrProf] Minimal Block Coverage
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Jun 4 11:15:21 PDT 2022
MaskRay added inline comments.
================
Comment at: llvm/include/llvm/Transforms/Instrumentation/BlockCoverageInference.h:15
+
+#ifndef LLVM_LIB_TRANSFORMS_INSTRUMENTATION_BLOCKCOVERAGEINFERENCE_H
+#define LLVM_LIB_TRANSFORMS_INSTRUMENTATION_BLOCKCOVERAGEINFERENCE_H
----------------
`LLVM_TRANSFORMS_INSTRUMENTATION_BLOCKCOVERAGEINFERENCE_H`
================
Comment at: llvm/lib/Transforms/Instrumentation/BlockCoverageInference.cpp:48
+
+namespace llvm {
+
----------------
remove. see https://llvm.org/docs/CodingStandards.html#use-namespace-qualifiers-to-implement-previously-declared-functions
================
Comment at: llvm/lib/Transforms/Instrumentation/BlockCoverageInference.cpp:50
+
+BlockCoverageInference::BlockCoverageInference(const Function *F,
+ bool ForceInstrumentEntry)
----------------
Use a reference for non-null.
delete `assert(F)`
================
Comment at: llvm/lib/Transforms/Instrumentation/BlockCoverageInference.cpp:57
+
+ NumFunctions++;
+ for (auto &BB : *F) {
----------------
https://llvm.org/docs/CodingStandards.html#prefer-preincrement
================
Comment at: llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp:265
+static cl::opt<bool> PGOBlockCoverage(
+ "pgo-block-coverage", cl::init(false), cl::Hidden, cl::ZeroOrMore,
+ cl::desc(
----------------
Delete `, cl::init(false)`
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D124490/new/
https://reviews.llvm.org/D124490
More information about the llvm-commits
mailing list