This is an archive of the discontinued LLVM Phabricator instance.

llvm-reduce: Fix tsan failures
ClosedPublic

Authored by arsenm on Nov 29 2022, 6:37 AM.

Details

Summary

There's a data race on the UninterestingChunks set. The code seems to
be operating on the assumption that all the tasks completed, so ensure
the unused results do complete. This started showing up about 50% of
the time when running operands-skip-parallel.ll after the recent
switch to use DenseSet; previously it failed much less frequently with
std::set.

We should introduce a mechanism to early terminate unused
results. Alternatively, I've been thinking about ways to to make the
reduction order smarter. I frequently have tests that take multiple
minutes to compile and hit the failure. It may be helpful to see which
chunks took the least time and prefer those over just taking the first
result.

Diff Detail

Event Timeline

arsenm created this revision.Nov 29 2022, 6:37 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 29 2022, 6:37 AM
arsenm requested review of this revision.Nov 29 2022, 6:37 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 29 2022, 6:37 AM
Herald added a subscriber: wdng. · View Herald Transcript
arsenm added a comment.Dec 1 2022, 7:57 AM

ping, I keep getting occasional bot emails on this

regehr accepted this revision.Dec 1 2022, 8:10 AM

LGTM!

This revision is now accepted and ready to land.Dec 1 2022, 8:10 AM
aeubanks accepted this revision.Dec 1 2022, 9:51 AM
aeubanks added inline comments.
llvm/tools/llvm-reduce/deltas/Delta.cpp
367

missing a word