[all-commits] [llvm/llvm-project] 74ad8f: [MLIR] Allow recovering from semi-affine sets in F...

William Moses via All-commits all-commits at lists.llvm.org
Mon Jul 27 14:13:29 PDT 2026


  Branch: refs/heads/users/wsmoses/aff
  Home:   https://github.com/llvm/llvm-project
  Commit: 74ad8fbc57103fb2b1332646472dcf9c293112f3
      https://github.com/llvm/llvm-project/commit/74ad8fbc57103fb2b1332646472dcf9c293112f3
  Author: William S. Moses <gh at wsmoses.com>
  Date:   2026-07-27 (Mon, 27 Jul 2026)

  Changed paths:
    M mlir/include/mlir/Analysis/FlatLinearValueConstraints.h
    M mlir/lib/Analysis/FlatLinearValueConstraints.cpp

  Log Message:
  -----------
  [MLIR] Allow recovering from semi-affine sets in FlatLinearValueConstraints

The IntegerSet constructor of FlatLinearValueConstraints asserts when
flattening fails, which happens for semi-affine integer sets. Since the
failure is signalled from inside a constructor, callers have no way to
detect the unsupported case ahead of time and no way to work around it;
they simply crash.

Add an optional `bool *error` parameter to the constructor. When it is
non-null, hitting the unimplemented case sets `*error` to true and
returns instead of asserting, letting callers bail out gracefully.
`*error` is set to false on success. When the pointer is null the
previous assert behavior is retained, so existing callers are unaffected.



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