[all-commits] [llvm/llvm-project] 9accbd: Add IntegerAttr::verifyConstructionInvariants.

Sean Silva via All-commits all-commits at lists.llvm.org
Wed Jan 29 12:23:01 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 9accbd58fb3f1dc824a7e43aef5c14b60b7dcefb
      https://github.com/llvm/llvm-project/commit/9accbd58fb3f1dc824a7e43aef5c14b60b7dcefb
  Author: Sean Silva <silvasean at google.com>
  Date:   2020-01-29 (Wed, 29 Jan 2020)

  Changed paths:
    M mlir/include/mlir/IR/Attributes.h
    M mlir/lib/IR/Attributes.cpp

  Log Message:
  -----------
  Add IntegerAttr::verifyConstructionInvariants.

Summary:
This will help catch improper use of the MLIR API's. In particular, this
catches an error that was manifesting as nondeterministic assertion
failures (the nondeterminism was due to the failure happening only when the
StorageUniquer's DenseMap's probing happened to compare two specific
keys).

No test. The fact that all the existing tests pass with this additional
invariant gives confidence that it is correct/useful.

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




More information about the All-commits mailing list