This is an archive of the discontinued LLVM Phabricator instance.

[ThinLTO][gold] Fix filenaming scheme for tasks.
ClosedPublic

Authored by hoy on Feb 5 2021, 1:18 PM.

Details

Summary

The gold LTO plugin uses a set of hooks to implements emit-llvm and capture intermediate file generated during LTO. The hooks are called by each lto backend thread with a taskID as argument to differentiate between threads and tasks. Currently, all threads are overwriting the same file which results into only the intermediate output of the last backend thread to be preserved. This diff encodes the taskID into the filename.

Diff Detail

Event Timeline

hoy created this revision.Feb 5 2021, 1:18 PM
hoy requested review of this revision.Feb 5 2021, 1:18 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 5 2021, 1:18 PM
wenlei accepted this revision.Feb 5 2021, 8:32 PM

thanks for fix, this looks good to me, but would be good to wait a bit in case others have comments.

This revision is now accepted and ready to land.Feb 5 2021, 8:32 PM
tejohnson accepted this revision.Feb 12 2021, 8:49 AM

lgtm with a minor request below.

llvm/tools/gold/gold-plugin.cpp
919

Document constant bool parameter. I.e. "/* TempOutFile */ false"

hoy updated this revision to Diff 323355.Feb 12 2021, 9:21 AM

Addressing tejohnson's comment.

This revision was landed with ongoing or failed builds.Feb 12 2021, 9:40 AM
This revision was automatically updated to reflect the committed changes.