[all-commits] [llvm/llvm-project] 52c116: [RISCV][VLOPT] Clear DemandedVLs for each invocati...

Alex Bradbury via All-commits all-commits at lists.llvm.org
Sun Feb 2 10:11:52 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 52c116218b61c088ac77f26c7b57347a5f54224d
      https://github.com/llvm/llvm-project/commit/52c116218b61c088ac77f26c7b57347a5f54224d
  Author: Alex Bradbury <asb at igalia.com>
  Date:   2025-02-02 (Sun, 02 Feb 2025)

  Changed paths:
    M llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp

  Log Message:
  -----------
  [RISCV][VLOPT] Clear DemandedVLs for each invocation of runOnMachineFunction

I was running into failed assertions of `isCandidate(UserMI)` in
`getMinimumVLForUser`, but only occurring with
`-enable-machine-outliner=never`. I believe this is a red herring, and
it just so happens the memory allocation pattern on my machine exposed
the bug with that flag.

DemandedVLs is never cleared, which means it accumulates more
MachineInstr pointer keys over time, and it's possible that when e.g.
running on function 'b', a MachineInstr pointer points to the same
memory location used for a candidate in 'a'. This causes the assertion
to fail.

Comment left on #124530 with more information.



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