r364201 - [clang][NewPM] Remove exception handling before loading pgo sample profile data

Leonard Chan via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 24 09:44:27 PDT 2019


Author: leonardchan
Date: Mon Jun 24 09:44:27 2019
New Revision: 364201

URL: http://llvm.org/viewvc/llvm-project?rev=364201&view=rev
Log:
[clang][NewPM] Remove exception handling before loading pgo sample profile data

This patch ensures that SimplifyCFGPass comes before SampleProfileLoaderPass
on PGO runs in the new PM and fixes clang/test/CodeGen/pgo-sample.c.

Differential Revision: https://reviews.llvm.org/D63626

Modified:
    cfe/trunk/test/CodeGen/pgo-sample.c

Modified: cfe/trunk/test/CodeGen/pgo-sample.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/pgo-sample.c?rev=364201&r1=364200&r2=364201&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/pgo-sample.c (original)
+++ cfe/trunk/test/CodeGen/pgo-sample.c Mon Jun 24 09:44:27 2019
@@ -1,6 +1,13 @@
 // Test if PGO sample use passes are invoked.
 //
 // Ensure Pass PGOInstrumentationGenPass is invoked.
-// RUN: %clang_cc1 -O2 -fprofile-sample-use=%S/Inputs/pgo-sample.prof %s -mllvm -debug-pass=Structure -emit-llvm -o - 2>&1 | FileCheck %s
-// CHECK: Remove unused exception handling info
-// CHECK: Sample profile pass
+// RUN: %clang_cc1 -O2 -fno-experimental-new-pass-manager -fprofile-sample-use=%S/Inputs/pgo-sample.prof %s -mllvm -debug-pass=Structure -emit-llvm -o - 2>&1 | FileCheck %s --check-prefix=LEGACY
+// RUN: %clang_cc1 -O2 -fexperimental-new-pass-manager -fprofile-sample-use=%S/Inputs/pgo-sample.prof %s -fdebug-pass-manager -emit-llvm -o - 2>&1 | FileCheck %s --check-prefix=NEWPM
+
+// LEGACY: Remove unused exception handling info
+// LEGACY: Sample profile pass
+
+// NEWPM: SimplifyCFGPass
+// NEWPM: SampleProfileLoaderPass
+
+int func(int a) { return a; }




More information about the cfe-commits mailing list