This is an archive of the discontinued LLVM Phabricator instance.

[ThinLTO] Support opt remarks options with distributed ThinLTO backends
ClosedPublic

Authored by tejohnson on May 4 2018, 1:50 PM.

Details

Summary

Passes down the necessary code ge options to the LTO Config to enable
-fdiagnostics-show-hotness and -fsave-optimization-record in the ThinLTO
backend for a distributed build.

Also, remove warning about not having PGO when the input is IR.

Diff Detail

Repository
rL LLVM

Event Timeline

tejohnson created this revision.May 4 2018, 1:50 PM
pcc added inline comments.May 4 2018, 3:32 PM
test/CodeGen/thinlto-diagnostic-handler-remarks-with-hotness.ll
14 ↗(On Diff #145281)

This file isn't named correctly according to the -foptimization-record-file flag, right? Looks like the easy fix would be to pass -1 as the task identifier to thinBackend, but it would probably be worth looking more closely at some point at how we name these extra files in LTO.

tejohnson updated this revision to Diff 145321.May 4 2018, 4:32 PM

Address comments

tejohnson marked an inline comment as done.May 4 2018, 4:32 PM

Fixed the output file as suggested. Also note that this test will fail and can't go in until after D46387

pcc accepted this revision.May 4 2018, 4:41 PM

LGTM

This revision is now accepted and ready to land.May 4 2018, 4:41 PM
tejohnson updated this revision to Diff 145348.May 4 2018, 8:15 PM

Update test for change to pass -1 as the Task ID for distributed backends,
and to reflect companion llvm change (D46488).

tejohnson added inline comments.May 4 2018, 8:17 PM
test/CodeGen/thinlto-diagnostic-handler-remarks-with-hotness.ll
14 ↗(On Diff #145281)

I realized after cleaning out old test outputs that this causes an issue with the handling of save-temps for ThinLTO distributed backends. Previously they were adding the task ID of "0", and this became unsigned -1 after this change. I sent an LLVM patch D46488 to change that so no Task ID is added to the path if it is -1, and updated the test in this clang patch.

pcc accepted this revision.May 4 2018, 8:40 PM

LGTM

This revision was automatically updated to reflect the committed changes.