[all-commits] [llvm/llvm-project] f93df9: [mlir][intrange] Use `nsw`, `nuw` flags in inference

Felix Schneider via All-commits all-commits at lists.llvm.org
Tue May 21 10:07:06 PDT 2024


  Branch: refs/heads/users/ubfx/intrange-infer-nsw-nuw
  Home:   https://github.com/llvm/llvm-project
  Commit: f93df9445063588e7afc9ed0071bbf5e7657c717
      https://github.com/llvm/llvm-project/commit/f93df9445063588e7afc9ed0071bbf5e7657c717
  Author: Felix Schneider <fx.schn at gmail.com>
  Date:   2024-05-21 (Tue, 21 May 2024)

  Changed paths:
    M mlir/include/mlir/Interfaces/Utils/InferIntRangeCommon.h
    M mlir/lib/Dialect/Arith/IR/InferIntRangeInterfaceImpls.cpp
    M mlir/lib/Dialect/Index/IR/InferIntRangeInterfaceImpls.cpp
    M mlir/lib/Interfaces/Utils/InferIntRangeCommon.cpp
    M mlir/test/Dialect/Arith/int-range-interface.mlir
    M mlir/test/Dialect/Arith/int-range-opts.mlir

  Log Message:
  -----------
  [mlir][intrange] Use `nsw`,`nuw` flags in inference

This patch includes the "no signed wrap" and "no unsigned wrap" flags,
which can be used to annotate some Ops in the `arith` dialect and also
in LLVMIR, in the integer range inference.

The general approach is to use saturating arithmetic operations to infer
bounds which are assumed to not wrap and use overflowing arithmetic
operations in the normal case. If overflow is detected in the normal case,
special handling makes sure that we don't underestimate the result range.


  Commit: 8117737c3d4876107bfbc550a2dcec93751387f6
      https://github.com/llvm/llvm-project/commit/8117737c3d4876107bfbc550a2dcec93751387f6
  Author: Felix Schneider <fx.schn at gmail.com>
  Date:   2024-05-21 (Tue, 21 May 2024)

  Changed paths:
    M mlir/lib/Dialect/Arith/IR/InferIntRangeInterfaceImpls.cpp
    M mlir/lib/Dialect/Index/IR/InferIntRangeInterfaceImpls.cpp

  Log Message:
  -----------
  address review comments


  Commit: d0a97c1e313a924e6a04bafab5712a571b5cda0d
      https://github.com/llvm/llvm-project/commit/d0a97c1e313a924e6a04bafab5712a571b5cda0d
  Author: Felix Schneider <fx.schn at gmail.com>
  Date:   2024-05-21 (Tue, 21 May 2024)

  Changed paths:
    M mlir/lib/Interfaces/Utils/InferIntRangeCommon.cpp

  Log Message:
  -----------
  fix clang build


  Commit: 9b400b71ae60c5ea80f4f99c3878e3c181820380
      https://github.com/llvm/llvm-project/commit/9b400b71ae60c5ea80f4f99c3878e3c181820380
  Author: Felix Schneider <fx.schn at gmail.com>
  Date:   2024-05-21 (Tue, 21 May 2024)

  Changed paths:
    M mlir/lib/Interfaces/Utils/InferIntRangeCommon.cpp

  Log Message:
  -----------
  Fix inference and formatting


Compare: https://github.com/llvm/llvm-project/compare/309253496bf4...9b400b71ae60

To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list