[PATCH] D131518: Make opt-viewer more usable by general developers

Ofek Shilon via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 9 13:24:50 PDT 2022


OfekShilon created this revision.
OfekShilon added reviewers: anemet, fhahn, Gerolf, paquette, thegameg.
Herald added a project: All.
OfekShilon requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

This is a submission of the OptView2 project <https://github.com/OfekShilon/optview2> to be considered upstream.

The suggested changes mostly try to improve SnR (for general devs, as opposed to compiler authors):

1. Exclude system headers by default,
2. Collect only optimization failures by default,
  1. Create option to split processing into subfolders ('--split-top-folders') to enable processing of large projects that typically break otherwise.
3. Trim repeated remark annotations in source - keep only 5 per line.
4. Enable filtering by remark name/text, preferrably via config file (but possible via command line too). Check config.yaml for some examples.
5. A complete rewrite of the index html, making the table sortable and resizable, display a single entry per file/line, use abridged func names, and display remark name instead of pass.

Except the rewrite of index.html and culling of duplicities, all changes can be reverted by command line options.
I uploaded some results of runs over medium/large projects, to get an impression of it:

1. cpython <https://ofekshilon.github.io/optview2-cpython/>
2. opencv <https://ofekshilon.github.io/optview2-opencv/>
3. mujoco <https://ofekshilon.github.io/optview2_mujoco/>


https://reviews.llvm.org/D131518

Files:
  llvm/tools/opt-viewer/assets/colResizable-1.6.min.js
  llvm/tools/opt-viewer/assets/favicon.ico
  llvm/tools/opt-viewer/assets/style.css
  llvm/tools/opt-viewer/config.yaml
  llvm/tools/opt-viewer/config_parser.py
  llvm/tools/opt-viewer/cpp_optimization_example/.gitignore
  llvm/tools/opt-viewer/cpp_optimization_example/Makefile
  llvm/tools/opt-viewer/cpp_optimization_example/main.cc
  llvm/tools/opt-viewer/cpp_optimization_example/run_optview2.sh
  llvm/tools/opt-viewer/opt-viewer.py
  llvm/tools/opt-viewer/optpmap.py
  llvm/tools/opt-viewer/optrecord.py
  llvm/tools/opt-viewer/requirements.txt

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D131518.451249.patch
Type: text/x-patch
Size: 52665 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220809/b75050b7/attachment-0001.bin>


More information about the llvm-commits mailing list