[all-commits] [llvm/llvm-project] 97ce7f: [UpdateTestChecks] Match unnamed values like "@[0-...

Johannes Doerfert via All-commits all-commits at lists.llvm.org
Tue Aug 11 23:06:29 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 97ce7fd89fcc92d84c1938108388f735d55d372c
      https://github.com/llvm/llvm-project/commit/97ce7fd89fcc92d84c1938108388f735d55d372c
  Author: Johannes Doerfert <johannes at jdoerfert.de>
  Date:   2020-08-12 (Wed, 12 Aug 2020)

  Changed paths:
    M clang/test/utils/update_cc_test_checks/Inputs/basic-cplusplus.cpp.expected
    M clang/test/utils/update_cc_test_checks/Inputs/mangled_names.c.funcsig.expected
    M llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/check_attrs.ll.funcattrs.expected
    M llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/check_attrs.ll.plain.expected
    M llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/scrub_attrs.ll.plain.expected
    A llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/various_ir_values.ll
    A llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/various_ir_values.ll.expected
    A llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/various_ir_values.ll.funcsig.expected
    A llvm/test/tools/UpdateTestChecks/update_test_checks/various_ir_values.test
    M llvm/utils/UpdateTestChecks/asm.py
    M llvm/utils/UpdateTestChecks/common.py
    M llvm/utils/update_cc_test_checks.py
    M llvm/utils/update_test_checks.py

  Log Message:
  -----------
  [UpdateTestChecks] Match unnamed values like "@[0-9]+" and "![0-9]+"

With this patch we will match most *uses* of "temporary" named things in
the IR via regular expressions, not their name at creation time. The new
"values" we match are:
  - "unnamed" globals: `@[0-9]+`
  - debug metadata: `!dbg ![0-9]+`
  - loop metadata: `!loop ![0-9]+`
  - tbaa metadata: `!tbaa ![0-9]+`
  - range metadata: `!range ![0-9]+`
  - generic metadata: `metadata ![0-9]+`
  - attributes groups: `#[0-9]`

We still don't match the declarations but that can be done later. This
patch can introduce churn when existing check lines contain the old
hardcoded versions of the above "values". We can add a flag to opt-out,
or opt-in, if necessary.

Reviewed By: arichardson, MaskRay

Differential Revision: https://reviews.llvm.org/D85099


  Commit: 3a033921ed321585436f353a498c86fa89ecb0ff
      https://github.com/llvm/llvm-project/commit/3a033921ed321585436f353a498c86fa89ecb0ff
  Author: Johannes Doerfert <johannes at jdoerfert.de>
  Date:   2020-08-12 (Wed, 12 Aug 2020)

  Changed paths:
    M llvm/test/Transforms/Attributor/ArgumentPromotion/crash.ll
    M llvm/test/Transforms/Attributor/ArgumentPromotion/dbg.ll
    M llvm/test/Transforms/Attributor/ArgumentPromotion/pr33641_remove_arg_dbgvalue.ll
    M llvm/test/Transforms/Attributor/ArgumentPromotion/reserve-tbaa.ll
    M llvm/test/Transforms/Attributor/IPConstantProp/PR16052.ll
    M llvm/test/Transforms/Attributor/IPConstantProp/openmp_parallel_for.ll
    M llvm/test/Transforms/Attributor/IPConstantProp/return-argument.ll
    M llvm/test/Transforms/Attributor/IPConstantProp/return-constant.ll
    M llvm/test/Transforms/Attributor/IPConstantProp/return-constants.ll
    M llvm/test/Transforms/Attributor/dereferenceable-1.ll
    M llvm/test/Transforms/Attributor/liveness.ll
    M llvm/test/Transforms/Attributor/nocapture-1.ll
    M llvm/test/Transforms/Attributor/nofree.ll
    M llvm/test/Transforms/Attributor/nonnull.ll
    M llvm/test/Transforms/Attributor/potential.ll
    M llvm/test/Transforms/Attributor/range.ll
    M llvm/test/Transforms/Attributor/value-simplify.ll
    M llvm/test/Transforms/Attributor/willreturn.ll

  Log Message:
  -----------
  [Attributor][NFC] Reformat tests after D85099

Reviewed By: sstefan1

Differential Revision: https://reviews.llvm.org/D85700


Compare: https://github.com/llvm/llvm-project/compare/31e5f7120bdd...3a033921ed32


More information about the All-commits mailing list