[PATCH] D112936: [Docs] Document scripts that are use to generate assertion in test cases

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 2 13:19:12 PDT 2021


RKSimon added inline comments.


================
Comment at: llvm/docs/TestingGuide.rst:290
+
+     % llvm/utils/update_llc_test_checks.py --llc-binary build/bin/llc -u `find llvm/test/CodeGen/RISCV/ \( -name '*.ll' -o -name '*.mir' \)`
+
----------------
jrtc27 wrote:
> jrtc27 wrote:
> > MaskRay wrote:
> > > Probably only run on existing tests which have the notice line.
> > > 
> > > Change `build` to something else to indicate it is a placeholder. Many people don't use `build` as the build directory.
> > > Probably only run on existing tests which have the notice line.
> > 
> > That's what the -u is for, will check the NOTE: line exists and matches the script name
> Which means, if you're documenting things here, you should probably note what -u does, otherwise people writing new test files who come to run update_llc_test_checks.py -u might get rather confused as to why it's doing nothing...
Its probably better to give an example that just specifies a couple of test files (e.g. 'test1.ll .... test3.ll' or something), trying to run the script on every file is slow and usually breaks somewhere that is then tricky to isolate.


================
Comment at: llvm/docs/TestingGuide.rst:292
+
+Most common scripts and their purposes or applications in generating assertions:
+
----------------
I meant expand the brief descriptions that I put in the comment, but assuming this renders properly I guess its OK.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D112936/new/

https://reviews.llvm.org/D112936



More information about the llvm-commits mailing list