[PATCH] D101918: [clang][Driver] Add -fintegrate-as to debug-pass-structure test

Jinsong Ji via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 5 09:07:55 PDT 2021


jsji created this revision.
jsji added reviewers: evgeny777, tejohnson.
jsji requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

CGProfilePass is not always on, it will be disabled when using
non-intergrated assemblers.

  // Only enable CGProfilePass when using integrated assembler, since
  // non-integrated assemblers don't recognize .cgprofile section.
  PMBuilder.CallGraphProfile = !CodeGenOpts.DisableIntegratedAS;

Add -fintegrate-as to make sure the output don't rely on the platform default.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D101918

Files:
  clang/test/Driver/debug-pass-structure.c


Index: clang/test/Driver/debug-pass-structure.c
===================================================================
--- clang/test/Driver/debug-pass-structure.c
+++ clang/test/Driver/debug-pass-structure.c
@@ -1,5 +1,5 @@
 // Test that we print pass structure with new and legacy PM.
-// RUN: %clang -fexperimental-new-pass-manager -fdebug-pass-structure -O3 -S -emit-llvm %s -o /dev/null 2>&1 | FileCheck %s --check-prefix=NEWPM
+// RUN: %clang -fexperimental-new-pass-manager -fdebug-pass-structure -fintegrated-as -O3 -S -emit-llvm %s -o /dev/null 2>&1 | FileCheck %s --check-prefix=NEWPM
 // RUN: %clang -flegacy-pass-manager -fdebug-pass-structure -O0 -S -emit-llvm %s -o /dev/null 2>&1 | FileCheck %s --check-prefix=LEGACYPM
 // REQUIRES: asserts
 
@@ -32,6 +32,7 @@
 // NEWPM-NEXT: ReversePostOrderFunctionAttrsPass on [module]
 // NEWPM-NEXT: RequireAnalysisPass<{{.*}}> on [module]
 // NEWPM-NEXT: ModuleToFunctionPassAdaptor on [module]
+// CGProfilePass is disabled with non-integrated assemblers
 // NEWPM-NEXT: CGProfilePass on [module]
 // NEWPM-NEXT: GlobalDCEPass on [module]
 // NEWPM-NEXT: ConstantMergePass on [module]


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D101918.343074.patch
Type: text/x-patch
Size: 1138 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210505/b4a81b08/attachment.bin>


More information about the cfe-commits mailing list