[PATCH] D133121: [PGO] Annotate branch_weight for invoke instruction

Rong Xu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 6 11:23:39 PDT 2022


xur added inline comments.


================
Comment at: llvm/lib/IR/Metadata.cpp:1512
+    if (!ProfileData)
+      return false;
+  }
----------------
hoy wrote:
> hoy wrote:
> > This seems to change existing behavior for invokes from legacy IR that have only VP metadata.
> How about this? Should both branch_weight and vp metadata be checked here to be downwards compatible? 
Sorry that I missed this comment.

Yes. you are right on this. Currently we return the VP counts as the total count. 
This does create a backward compatibility issue if we use an older profile.

I will check both VP and branch_weights.


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

https://reviews.llvm.org/D133121



More information about the llvm-commits mailing list