[PATCH] D65975: [NewPM][PassInstrumentation] IR printing support from clang driver

Fedor Sergeev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 9 12:57:24 PDT 2019


fedor.sergeev added a comment.

In D65975#1621892 <https://reviews.llvm.org/D65975#1621892>, @twoh wrote:

> @fedor.sergeev @yamauchi I saw your discussions over llvm-dev mailing list regarding IR printing with the new pass manager, and though this might be the reason why IR printing is not supported under new PM with clang. I would appreciate if you can take a look.


Yep, you are right, standard instrumentation needs to be passed into PassBuilder for printing and time-passes to work.
Main changes are fine, just a small note on the test below.



================
Comment at: clang/test/Misc/printer.c:1
+// RUN: %clang_cc1 -emit-llvm -O2 -fexperimental-new-pass-manager -mllvm -print-before-all %s -o %t 2>&1 | FileCheck %s --check-prefix=CHECK-BEFORE
+// RUN: %clang_cc1 -emit-llvm -O2 -fexperimental-new-pass-manager -mllvm -print-after-all %s -o %t 2>&1 | FileCheck %s --check-prefix=CHECK-AFTER
----------------
Can this test avoid using -O2 and check for some generic always-present pass like ModuleVerifier?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D65975





More information about the cfe-commits mailing list