[PATCH] D87337: [PGO] De-Optimizing cold functions based on PGO info (PATCH 1/2)

Renato Golin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 10 03:35:31 PDT 2020


rengolin added a comment.

Implementation-wise, this looks good, but I wonder if we could join minsize with this using the same (or very similar) controls.



================
Comment at: llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp:1808
+      F->markOptnoneIfPossible();
+      LLVM_DEBUG(dbgs() << "Add optnone attribute to function: " << F->getName()
+                        << "\n");
----------------
Nit: keep the same language "Set optnone..."


================
Comment at: llvm/test/Transforms/PGOProfile/omit-cold-func-opt.ll:11
+
+; RUN: opt < %s -pgo-instr-use -pgo-test-profile-file=%t.profdata -profile-omit-cold-func-opt -profile-omit-cold-func-opt-percent=25 -S -o - | FileCheck --check-prefixes=CHECK-0-PERCENT,CHECK-25-PERCENT %s
+
----------------
IIUC, the range is inclusive. So, would be nice to have an additional 50% test to show that.


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

https://reviews.llvm.org/D87337



More information about the llvm-commits mailing list