[PATCH] D22825: Add a counter-function insertion pass
Hal Finkel via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 26 13:38:14 PDT 2016
hfinkel added inline comments.
================
Comment at: lib/CodeGen/TargetPassConfig.cpp:474
@@ -472,1 +473,3 @@
+ // Insert calls to mcount-like functions.
+ addPass(createCountingFunctionInserterPass());
}
----------------
rjmccall wrote:
> This should only be added if the flag to add the attributes is enabled, right?
No, it always adds the pass. The pass just dosen't do anything if the function does not have the attribute. We don't want to predicate it on some CodeGen state because then it won't work with LTO.
https://reviews.llvm.org/D22825
More information about the llvm-commits
mailing list