[ThinLTO] Add additional ThinLTO pipeline testing with new PM
authorTeresa Johnson <tejohnson@google.com>
Fri, 10 Jan 2020 21:29:01 +0000 (13:29 -0800)
committerTeresa Johnson <tejohnson@google.com>
Mon, 13 Jan 2020 16:29:56 +0000 (08:29 -0800)
commit2af97be8027a0823b88d4b6a07fc5eedb440bc1f
tree92155724350fc8218cff56a26275eb73ca80bb4e
parent07804f75a6cc506fada40c474f1e60840ce737d8
[ThinLTO] Add additional ThinLTO pipeline testing with new PM

Summary:
I've added some more extensive ThinLTO pipeline testing with the new PM,
motivated by the bug fixed in D72386.

I beefed up llvm/test/Other/new-pm-pgo.ll a little so that it tests
ThinLTO pre and post link with PGO, similar to the testing for the
default pipelines with PGO.

Added new pre and post link PGO tests for both instrumentation and
sample PGO that exhaustively test the pipelines at different
optimization levels via opt.

Added a clang test to exhaustively test the post link pipeline invoked for
distributed builds. I am currently only testing O2 and O3 since these
are the most important for performance.

It would be nice to add similar exhaustive testing for full LTO, and for
the old PM, but I don't have the bandwidth now and this is a start to
cover some of the situations that are not currently default and were
under tested.

Reviewers: wmi

Subscribers: mehdi_amini, inglorion, hiraditya, steven_wu, dexonsmith, jfb, cfe-commits, llvm-commits

Tags: #clang, #llvm

Differential Revision: https://reviews.llvm.org/D72538
clang/test/CodeGen/thinlto-distributed-newpm.ll [new file with mode: 0644]
llvm/test/Other/Inputs/new-pm-thinlto-prelink-pgo-defaults.proftext [new file with mode: 0644]
llvm/test/Other/Inputs/new-pm-thinlto-samplepgo-defaults.prof [new file with mode: 0644]
llvm/test/Other/new-pm-pgo.ll
llvm/test/Other/new-pm-thinlto-postlink-pgo-defaults.ll [new file with mode: 0644]
llvm/test/Other/new-pm-thinlto-postlink-samplepgo-defaults.ll [new file with mode: 0644]
llvm/test/Other/new-pm-thinlto-prelink-pgo-defaults.ll [new file with mode: 0644]
llvm/test/Other/new-pm-thinlto-prelink-samplepgo-defaults.ll [new file with mode: 0644]