[PATCH] D142373: [Utils] Add --full-function-signature to update_cc_test_checks.pyh to match return type as well as args

Alex Bradbury via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 23 08:34:27 PST 2023


asb created this revision.
asb added reviewers: arichardson, nikic, mtrofin.
Herald added subscribers: wingo, pmatos, StephenFan, luismarques, sameer.abuasal, s.egerton, PkmX, simoncook.
Herald added a project: All.
asb requested review of this revision.
Herald added projects: clang, LLVM.
Herald added a subscriber: cfe-commits.

This is an alternative, less intrusive take on D133943 <https://reviews.llvm.org/D133943> (where we were unable to find consensus on how to handle updating existing in-tree tests).

Zooming right out, the basic problem is that `--function-signature` checks arguments but now the return type. This limitation means it's not very useful for my use case (making RISC-V ABI tests more maintainable). The value of this is huge - manually updating CHECK lines in the previous ABI tests was a massive timesink, and with this feature it is _massively_ easier.

Although it would be cleaner in a sense to update `--function-signature` and find agreement on transitioning in-tree tests to the new behaviour, I think adding the separate command-line flag is the best option available at this point. It's hopefully much easier to get this reviewed and landed, thus unblocking the ABI test refactorings and follow-on bug fixes that rely on it. There's also a clear migration path - in the future `--function-signature` could be updated to act like `--full-function-signature` and `--full-function-signature` be either removed or left as an alias. It would be slightly better to support `--function-signature=full`, but I couldn't find a way to accept an optional argument but only with `--foo=bar` syntax (rather than `--foo bar`, which could break existing command lines) with default argparse routines.

I'd really, really, really appreciate help on unblocking this (reviews or other feedback). Thank you in advance.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D142373

Files:
  clang/test/utils/update_cc_test_checks/Inputs/mangled_names.c.fullfuncsig.expected
  clang/test/utils/update_cc_test_checks/mangled_names.test
  llvm/utils/UpdateTestChecks/asm.py
  llvm/utils/UpdateTestChecks/common.py
  llvm/utils/UpdateTestChecks/isel.py
  llvm/utils/update_cc_test_checks.py
  llvm/utils/update_test_checks.py

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D142373.491393.patch
Type: text/x-patch
Size: 14886 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230123/289a5eb0/attachment-0001.bin>


More information about the cfe-commits mailing list