[all-commits] [llvm/llvm-project] b1ba3d: llvm-reduce: Error on -j with MIR inputs (#226225)

Matt Arsenault via All-commits all-commits at lists.llvm.org
Thu Sep 24 10:25:14 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b1ba3d515a0238adbfc6c349ed3b33f9060cea72
      https://github.com/llvm/llvm-project/commit/b1ba3d515a0238adbfc6c349ed3b33f9060cea72
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2026-09-24 (Thu, 24 Sep 2026)

  Changed paths:
    A llvm/test/tools/llvm-reduce/mir/parallel-jobs-unsupported.mir
    M llvm/tools/llvm-reduce/deltas/Delta.cpp
    M llvm/tools/llvm-reduce/deltas/Delta.h
    M llvm/tools/llvm-reduce/llvm-reduce.cpp

  Log Message:
  -----------
  llvm-reduce: Error on -j with MIR inputs (#226225)

Parallel chunk processing distributes work by serializing the program to
bitcode and reparsing it in each worker thread. Bitcode cannot represent
MachineFunctions, so readBitcode leaves ReducerWorkItem::MMI null and
the reparsed item reports isMIR() == false. The delta pass list is still the
MIR one, chosen from the original program, so the worker runs a MIR pass
over an item with no MachineModuleInfo and dereferences null.

This broke every MIR reduction using -j > 1, though not immediately: the
parallel path is only taken once there is more than one chunk left to
process, so the crash appeared after the first granularity increase.

Reject the combination up front instead of crashing partway through a
reduction. Supporting it would mean exchanging MIR text rather than
bitcode, and giving each worker its own TargetMachine.

Co-Authored-By: Claude Opus 5 <noreply at anthropic.com>



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list