xbolva00 added inline comments.

================
Comment at: clang/lib/CodeGen/MisExpect.cpp:140-146
+void EmitMisExpectWarning(const CallExpr *Call, CodeGenModule &CGM) {
+  SourceLocation ExprLoc = Call->getBeginLoc();
+  unsigned DiagID = CGM.getDiags().getCustomDiagID(
+      DiagnosticsEngine::Warning, "Current PGO counters disagree with "
+                                  "the use of __builtin_expect().");
+  CGM.getDiags().Report(ExprLoc, DiagID);
+}
----------------
paulkirth wrote:
> lebedev.ri wrote:
> > This is rather undescriptive.
> > Can you output some more useful info?
> Do you have a suggestion about what feedback would be more useful?
> 
> My initial thought with the somewhat generic message was to simply point out 
> that this usage looked problematic, and let the developer investigate. I 
> wasn't sure we wanted to expose details of the internal heuristic to the user 
> by reporting the internal thresholds.
Message is currently confusing a bit. I really miss clear info like

“This compiler hint seems to be incorrect according to current PGO counters. 
Please check the hint if it is still valid and perf-profitable”.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D65300/new/

https://reviews.llvm.org/D65300



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to