[all-commits] [llvm/llvm-project] 4ecdbf: llvm-reduce: Fix tsan failures

Matt Arsenault via All-commits all-commits at lists.llvm.org
Thu Dec 1 11:41:34 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4ecdbf2e4ececec82cabb0d6e21f8397aa148b57
      https://github.com/llvm/llvm-project/commit/4ecdbf2e4ececec82cabb0d6e21f8397aa148b57
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2022-12-01 (Thu, 01 Dec 2022)

  Changed paths:
    M llvm/tools/llvm-reduce/deltas/Delta.cpp

  Log Message:
  -----------
  llvm-reduce: Fix tsan failures

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.


  Commit: f5e2eb11d8c4f54e26aed442d5262396b4b327a7
      https://github.com/llvm/llvm-project/commit/f5e2eb11d8c4f54e26aed442d5262396b4b327a7
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2022-12-01 (Thu, 01 Dec 2022)

  Changed paths:
    M llvm/include/llvm/IR/Intrinsics.td
    M llvm/test/Transforms/SpeculativeExecution/spec-calls.ll

  Log Message:
  -----------
  Intrinsics: Make is_fpclass and arithmetic_fence speculatable


Compare: https://github.com/llvm/llvm-project/compare/d4fbb9362071...f5e2eb11d8c4


More information about the All-commits mailing list