[PATCH] D134456: [PGO] Consider parent context when weighing branches with likelyhood.

Hans Wennborg via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 22 10:40:56 PDT 2022


hans added reviewers: Mordante, aaron.ballman.
hans added a comment.

Looks reasonable to me.

+the folks from D85091 <https://reviews.llvm.org/D85091> fyi or if they want to take a look.



================
Comment at: clang/test/Profile/cxx-never-executed-branch.cpp:1
+// Test the clang doesn't emit llvm.expect when the counter is 0
+
----------------
ultra nit: s/the/that/ (for the first one)


================
Comment at: clang/test/Profile/cxx-never-executed-branch.cpp:4
+// RUN: llvm-profdata merge %S/Inputs/cxx-never-executed-branch.proftext -o %t.profdata
+// RUN: %clang_cc1 -std=c++20 %s -O2 -o - -emit-llvm -fprofile-instrument-use-path=%t.profdata -disable-llvm-passes | FileCheck %s
+
----------------
This probably needs a -target flag, since otherwise the mangled function names might not match the profile (e.g. on Windows).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D134456



More information about the cfe-commits mailing list