[all-commits] [llvm/llvm-project] 86eb57: [mlir][drr] Simple heuristic to reduce chance of a...

Jacques Pienaar via All-commits all-commits at lists.llvm.org
Wed Dec 1 20:45:28 PST 2021

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 86eb57b728c85bd1658f542d6ce8340efa63b4df
  Author: Jacques Pienaar <jpienaar at google.com>
  Date:   2021-12-01 (Wed, 01 Dec 2021)

  Changed paths:
    M mlir/tools/mlir-tblgen/RewriterGen.cpp

  Log Message:
  [mlir][drr] Simple heuristic to reduce chance of accidental nullptr dereference

When an attribute is optional & is given an additional constraint in
rewrite pattern that could lead to dereferencing null Attribute. Avoid
cases where the constraints checks attribute but has no check if null.

This should be improved to be more uniformly guarded.

More information about the All-commits mailing list