[all-commits] [llvm/llvm-project] 778db8: [gicombiner] Allow disable-rule option to disable ...

Daniel Sanders via All-commits all-commits at lists.llvm.org
Tue Jun 16 16:57:40 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 778db88723d77e5ec1d55a57d0ea979ead988cf4
      https://github.com/llvm/llvm-project/commit/778db88723d77e5ec1d55a57d0ea979ead988cf4
  Author: Daniel Sanders <daniel_l_sanders at apple.com>
  Date:   2020-06-16 (Tue, 16 Jun 2020)

  Changed paths:
    M llvm/test/CodeGen/AArch64/GlobalISel/prelegalizercombiner-copy-prop-disabled.mir
    M llvm/utils/TableGen/GICombinerEmitter.cpp

  Log Message:
  -----------
  [gicombiner] Allow disable-rule option to disable all-except-...

Summary:
Adds two features to the generated rule disable option:
- '*' - Disable all rules
- '!<foo>' - Re-enable rule(s)
  - '!foo' - Enable rule named 'foo'
  - '!5' - Enable rule five
  - '!4-9' - Enable rule four to nine
  - '!foo-bar' - Enable rules from 'foo' to (and including) 'bar'
(the '!' is available to the generated disable option but is not part of the underlying and determines whether to call setRuleDisabled() or setRuleEnabled())

This is intended to support unit testing of combine rules so
that you can do:
  GeneratedCfg.setRuleDisabled("*")
  GeneratedCfg.setRuleEnabled("foo")
to ensure only a specific rule is in effect. The rule is still
required to be included in a combiner though

Also added --...-only-enable-rule=X,Y which is effectively an
alias for --...-disable-rule=*,!X,!Y and as such interacts
properly with disable-rule.

Reviewers: aditya_nandakumar, bogner, volkan, aemerson, paquette, arsenm

Subscribers: wdng, llvm-commits

Tags: #llvm

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




More information about the All-commits mailing list