[PATCH] D20082: [ProfileData] Use SoftInstrProfErrors to count soft errors
David Li via llvm-commits
llvm-commits at lists.llvm.org
Tue May 10 11:37:07 PDT 2016
davidxl added inline comments.
================
Comment at: include/llvm/ProfileData/InstrProf.h:287
@@ -286,10 +286,3 @@
-inline instrprof_error MergeResult(instrprof_error &Accumulator,
- instrprof_error Result) {
- // Prefer first error encountered as later errors may be secondary effects of
- // the initial problem.
- if (Accumulator == instrprof_error::success &&
- Result != instrprof_error::success)
- Accumulator = Result;
- return Accumulator;
-}
+class SoftInstrProfErrors {
+ /// Count the number of soft instrprof_errors encountered.
----------------
Add some comments to the class.
================
Comment at: lib/ProfileData/InstrProfWriter.cpp:169
@@ -168,3 +168,3 @@
- instrprof_error Result = instrprof_error::success;
+ SoftInstrProfErrors SIPE;
if (NewFunc) {
----------------
Do we really need to pass down the instance reference through all the interfaces? I suppose there should be one singleton instance of error, so some global error update APIs will do?
http://reviews.llvm.org/D20082
More information about the llvm-commits
mailing list