[all-commits] [llvm/llvm-project] 5b77f2: [MLIR][Remark] Emit final-policy remarks in determ...
Henrich Lauko via All-commits
all-commits at lists.llvm.org
Mon Sep 21 06:41:29 PDT 2026
Branch: refs/heads/users/xlauko/mlir-remark-final-order
Home: https://github.com/llvm/llvm-project
Commit: 5b77f2f8cee5519123ef711be156656e466babec
https://github.com/llvm/llvm-project/commit/5b77f2f8cee5519123ef711be156656e466babec
Author: Henrich Lauko <hlauko at nvidia.com>
Date: 2026-09-21 (Mon, 21 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 Identity: 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.
Identity is a private nested type of the policy, since nothing outside
decides what that policy treats as the same remark. Its asTuple() is the
only place the field list appears and drives both hashing and equality,
so the two cannot disagree about which fields matter. IdentityInfo is
passed as the KeyInfoT of the MapVector's DenseMap rather than
specializing llvm::DenseMapInfo, which keeps this inside mlir::remark
and removes DenseMapInfo<Remark>.
Behaviour change: order only. The fields that make up the identity are
unchanged.
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