This is an archive of the discontinued LLVM Phabricator instance.

[Remarks] Introduce `llvm-remark-diff` tool.
Needs RevisionPublic

Authored by zjaffal on Jul 12 2023, 4:07 AM.

Details

Summary

This tool is an extension to llvm-remark-size-diff. Offering a more
generic tool to diff remarks.

For each function name, source file path and line and column information
in two files, the tool will find the remarks that only in either of the
files exclusively or the remarks that differ in remark type or any of
the remarks arguments.

The tool displays the information as a json file with varying levels of
verbosity.
if show-arg-diff-only is passed the tool will only show remarks that exist in

both files where remark type are different.

if show-remark-type-diff-only is passed the tool will only show

remarks where the remark type is different.

if only-show-common-remarks is passed the tool will show only remarks

that have the same header in both files.

Diff Detail

Event Timeline

zjaffal created this revision.Jul 12 2023, 4:07 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 12 2023, 4:07 AM
Herald added a subscriber: StephenFan. · View Herald Transcript
zjaffal requested review of this revision.Jul 12 2023, 4:07 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 12 2023, 4:07 AM
thegameg requested changes to this revision.Jul 17 2023, 3:00 AM

Few things:

  1. Can we make the default mode to output something like opt-diff (llvm/tools/opt-viewer/opt-diff.py)? Then you can have a JSON mode.
  2. Can this be a cl::SubCommand of llvm-remarkutil? It would be great if llvm-remark-size-diff was too.
llvm/include/llvm/Remarks/Remark.h
134

Why?

This revision now requires changes to proceed.Jul 17 2023, 3:00 AM
  1. Can this be a cl::SubCommand of llvm-remarkutil? It would be great if llvm-remark-size-diff was too.

+1

maybe usage could be like

llvm-remarkutil diff <remark-type> <A> <B>