[llvm] [SHT_LLVM_BB_ADDR_MAP][AsmPrinter] Implements PGOAnalysisMap emitting in AsmPrinter with tests. (PR #75202)

Micah Weston via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 20 13:53:50 PST 2023


================
@@ -1932,8 +2000,15 @@ void AsmPrinter::emitFunctionBody() {
 
   // Emit section containing BB address offsets and their metadata, when
   // BB labels are requested for this function. Skip empty functions.
-  if (MF->hasBBLabels() && HasAnyRealCode)
+  bool HasBBLabels = MF->hasBBLabels();
+  if (HasBBLabels && HasAnyRealCode)
----------------
red1bluelost wrote:

Nice, I hadn't thought to swap the condition.

https://github.com/llvm/llvm-project/pull/75202


More information about the llvm-commits mailing list