[Mlir-commits] [mlir] [MLIR] Add option to postpone remark emission (PR #157434)
Razvan Lupusoru
llvmlistbot at llvm.org
Thu Sep 18 15:03:42 PDT 2025
razvanlupusoru wrote:
> At the point of emission, you know whether the Remark should be postponed or not — for example, if you know a later pass will attempt to optimize this op again. If postponing is handled entirely in the callback, how would it know which remarks to postpone and which not to?
For my use case, I plan to sort and group so that all messages for a specific line number are together. The pass emitting the remark doesn't necessarily know I need to do that so it is surprising it would be the one controlling whether the remark it emits gets postponed or not.
Also, I can see cases where the pass emitting the remark won't know it is finalized. One example in OpenACC pipeline is that we want messages emitted for when we decide to do an implicit copy to GPU. However, we are planning for a follow-up pass to finetune and add bounds based on array range use for that copy. I do not see how the pass emitting the remark can know whether the message is final or might need dropped/replaced later.
> My impression is that @razvanlupusoru wants to postpone every remark by default — if that’s the case, we could add a postponeAll flag to RemarkEngine.
Yes I do - I want to collect all remarks to sort them and group them- and I can only do that once I have all of them and all are "postponed".
And thank you again for working on this functionality Guray! I appreciate that you are creating a framework that can be useful for others :)
https://github.com/llvm/llvm-project/pull/157434
More information about the Mlir-commits
mailing list