[PATCH] D68438: [gicombiner] Add the run-time rule disable option

Volkan Keles via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 15 14:14:31 PDT 2019


volkan added inline comments.


================
Comment at: llvm/test/CodeGen/AArch64/GlobalISel/prelegalizercombiner-copy-prop-disabled.mir:2
+# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
+# RUN: llc -O0 -run-pass=aarch64-prelegalizer-combiner -global-isel -verify-machineinstrs %s -o - \
+# RUN:                                                                | FileCheck --check-prefix=ENABLED %s
----------------
No need to pass `-O0` and `-global-isel` as it runs a specific pass.


================
Comment at: llvm/test/CodeGen/AArch64/GlobalISel/prelegalizercombiner-copy-prop-disabled.mir:5
+# RUN: llc -O0 -run-pass=aarch64-prelegalizer-combiner -global-isel -verify-machineinstrs %s -o - \
+# RUN:     --aarch64prelegalizercombinerhelper-disable-rule=copy_prop | FileCheck --check-prefix=DISABLED %s
+
----------------
Could you add a test case that disables the rule using the ID?


================
Comment at: llvm/utils/TableGen/GICombinerEmitter.cpp:400
+     << "#else // ifndef NDEBUG\n"
+     << "  return false;\n"
+     << "#endif // ifndef NDEBUG\n"
----------------
Looks like it's not possible to disable a rule in Release mode. I thought it'd support disabling by rule id, could you double check?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D68438





More information about the llvm-commits mailing list