[NFC] Do not run CGProfilePass when not using integrated assembler
authorzhizhouy <zhizhouy@google.com>
Tue, 31 Mar 2020 17:23:17 +0000 (10:23 -0700)
committerzhizhouy <zhizhouy@google.com>
Tue, 31 Mar 2020 17:31:31 +0000 (10:31 -0700)
commit94d912296de21e965198ba1ddd1ca6714b3e4722
treecb7c00c1f45054a21f7cbbeb93a575c82d1ecaad
parent4799a1745b300710c800e4bfa55c6bb630edd58c
[NFC] Do not run CGProfilePass when not using integrated assembler

Summary:
CGProfilePass is run by default in certain new pass manager optimization pipeline. Assemblers other than llvm as (such as gnu as) cannot recognize the .cgprofile entries generated and emitted from this pass, causing build time error.

This patch adds new options in clang CodeGenOpts and PassBuilder options so that we can turn cgprofile off when not using integrated assembler.

Reviewers: Bigcheese, xur, george.burgess.iv, chandlerc, manojgupta

Reviewed By: manojgupta

Subscribers: manojgupta, void, hiraditya, dexonsmith, llvm-commits, tcwang, llozano

Tags: #llvm, #clang

Differential Revision: https://reviews.llvm.org/D62627
clang/include/clang/Basic/CodeGenOptions.def
clang/lib/CodeGen/BackendUtil.cpp
clang/lib/Frontend/CompilerInvocation.cpp
llvm/include/llvm/Passes/PassBuilder.h
llvm/lib/Passes/PassBuilder.cpp
llvm/test/Other/new-pm-cgprofile.ll [new file with mode: 0644]