[PATCH] D109234: [PGO] Change ThinLTO test for targets with loop unrolling disabled

Teresa Johnson via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 14 10:06:09 PDT 2021


tejohnson added inline comments.


================
Comment at: clang/test/CodeGen/pgo-sample-thinlto-summary.c:1
-// RUN: %clang_cc1 -O2 -fprofile-sample-use=%S/Inputs/pgo-sample-thinlto-summary.prof %s -emit-llvm -o - 2>&1 | FileCheck %s -check-prefix=SAMPLEPGO
-// RUN: %clang_cc1 -O2 -fprofile-sample-use=%S/Inputs/pgo-sample-thinlto-summary.prof %s -emit-llvm -flto=thin -o - 2>&1 | FileCheck %s -check-prefix=THINLTO
-// RUN: %clang_cc1 -O2 -fexperimental-new-pass-manager -fprofile-sample-use=%S/Inputs/pgo-sample-thinlto-summary.prof %s -emit-llvm -o - 2>&1 | FileCheck %s -check-prefix=SAMPLEPGO
-// RUN: %clang_cc1 -O2 -fexperimental-new-pass-manager -fprofile-sample-use=%S/Inputs/pgo-sample-thinlto-summary.prof %s -emit-llvm -flto=thin -o - 2>&1 | FileCheck %s -check-prefix=THINLTO
-// Checks if hot call is inlined by normal compile, but not inlined by
-// thinlto compile.
+// RUN: %clang_cc1 -mllvm -opt-bisect-limit=-1 -O2 -fprofile-sample-use=%S/Inputs/pgo-sample-thinlto-summary.prof %s -emit-llvm -o - 2>&1 | FileCheck %s -check-prefix=SAMPLEPGO
+// RUN: %clang_cc1 -mllvm -opt-bisect-limit=-1 -O2 -fprofile-sample-use=%S/Inputs/pgo-sample-thinlto-summary.prof %s -emit-llvm -flto=thin -o - 2>&1 | FileCheck %s -check-prefix=THINLTO
----------------
sherwin-dc wrote:
> tejohnson wrote:
> > -opt-bisect-limit seems like a roundabout way to get the pass invocations printed. How about just -mllvm -debug-pass=Structure?
> I had tried using `-mllvm -debug-pass=Structure` but could not get anything to print out. It only worked when I removed `-cc1 -nostdsysteminc` and `-emit-llvm` which is used when lit runs the tests.
I see - this doesn't work with the new PM which is now default. For that you can use -fdebug-pass-manager. For the old PM the -mllvm -debug-pass=Structure does work with -cc1 -emit-llvm. Since the first couple invocations appear meant to check the oldPM, I would add an explicit -fno-experimental-new-pass-manager to their invocations, since that is no longer the default. 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D109234



More information about the cfe-commits mailing list