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

Shivam Gupta via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 2 19:04:58 PDT 2021


xgupta added a comment.

Thanks for the review.



================
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' \)`
+
----------------
RKSimon wrote:
> 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.
> Change build to something else to indicate it is a placeholder. Many people don't use build as the build directory.

I have seen LLVM getting started and typofix tutorial, most llvm documents use `build` as standard, I also think it is better for copy-paste.


================
Comment at: llvm/docs/TestingGuide.rst:292
+
+Most common scripts and their purposes or applications in generating assertions:
+
----------------
RKSimon wrote:
> I meant expand the brief descriptions that I put in the comment, but assuming this renders properly I guess its OK.
Probably do it some other day after using them a bit.


================
Comment at: llvm/docs/TestingGuide.rst:294
+
+update_analyze_test_checks.py
+opt --analyze --costmodel
----------------
MaskRay wrote:
> This may render poorly in rst. Place them into a code-block
Thanks, I tested the generated .html file, it looks fine now.


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