[all-commits] [llvm/llvm-project] 386817: [MLIR][Remark] Emit final-policy remarks in determ...

Henrich Lauko via All-commits all-commits at lists.llvm.org
Fri Sep 18 06:15:51 PDT 2026


  Branch: refs/heads/users/xlauko/mlir-remark-final-order
  Home:   https://github.com/llvm/llvm-project
  Commit: 386817fe2fc9e00ba06e47df571e229ef9030ac1
      https://github.com/llvm/llvm-project/commit/386817fe2fc9e00ba06e47df571e229ef9030ac1
  Author: Henrich Lauko <hlauko at nvidia.com>
  Date:   2026-09-18 (Fri, 18 Sep 2026)

  Changed paths:
    M mlir/docs/Remarks.md
    M mlir/include/mlir/IR/Remarks.h
    M mlir/lib/IR/Remarks.cpp
    M mlir/test/Pass/remark-final.mlir
    M mlir/unittests/IR/RemarkTest.cpp

  Log Message:
  -----------
  [MLIR][Remark] Emit final-policy remarks in deterministic order

RemarkEmittingPolicyFinal stores remarks in a DenseSet whose hash
includes the location pointer, so the output order depends on heap
layout and changes between runs. Twenty runs of mlir/test/Pass/remark-final.mlir gave
fourteen different orders, which is why the test uses CHECK-DAG.

Store remarks in a MapVector keyed by a new RemarkIdentity: location,
remark name, combined category name and kind, the same fields the
DenseSet compared. A repeated identity overwrites the stored remark in
place, so a remark is printed where its identity was first reported with
the content it last had. Root remarks come out in first-report order and
linked children still follow their parent. DenseMapInfo<Remark> is
removed. RemarkIdentity is now the one place that says what the final
policy treats as the same remark.

Behaviour change: order only. The identity is unchanged. Deleting
DenseMapInfo<Remark> also deletes its "<EMPTY_KEY>" comparison, the same
cleanup #224612 proposes on its own.

remark-final.mlir switches to ordered CHECK lines. New unit tests cover
first-position-last-content replacement, and two identity
normalizations that had no coverage: an empty name equals the
"<unknown remark name>" placeholder, and category plus sub-category
equals the combined "category:sub" name.

Assisted-by: Claude Code (Claude Fable 5.1)



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