This is an archive of the discontinued LLVM Phabricator instance.

[LTO] Remove temporary files corresponding to stream which LTO skips
AbandonedPublic

Authored by vitalybuka on Dec 17 2017, 6:40 PM.

Details

Reviewers
espindola
Summary

Recently few test failed to detect regression because of files created on the
previews run.

Event Timeline

vitalybuka created this revision.Dec 17 2017, 6:40 PM
vitalybuka added inline comments.Dec 17 2017, 6:43 PM
lld/COFF/LTO.cpp
150

No tests as I don't know how to reproduce this for LLD.
In other LTO invocation it can be triggered with -thinlto-distributed-indexes

Not sure if this patch is needed, or we can just ignore the issue

tejohnson added inline comments.
llvm/test/ThinLTO/X86/delete-unused-temps.ll
9

I'm not sure I understand what is going on - why are there fewer files after the -thinlto-distributed-indexes invocation than without?

vitalybuka added inline comments.Dec 22 2017, 2:32 PM
llvm/test/ThinLTO/X86/delete-unused-temps.ll
9

not 100% sure without debugging, but I think it's because LTO::getMaxTasks() in both cases returns 2, so LTO client expects 2 streams. But with -thinlto-distributed-indexes nothing is written into the last stream as module is empty, and nothing deletes corresponding file from a previous runs.

vitalybuka removed a reviewer: pcc.May 9 2018, 3:01 PM
vitalybuka added a subscriber: pcc.
pcc added a comment.May 9 2018, 3:06 PM

I probably wouldn't do this. It seems a little better to change the tests to rm -f the expected files beforehand rather than have the tests rely on code to work properly.

vitalybuka abandoned this revision.May 9 2018, 3:09 PM