[all-commits] [llvm/llvm-project] 31a233: [mlir] canonicalize away zero-iteration SCF for loops

ftynse via All-commits all-commits at lists.llvm.org
Mon Nov 23 06:04:53 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 31a233d46367636f94c487b51aa2931a1cc9cf79
      https://github.com/llvm/llvm-project/commit/31a233d46367636f94c487b51aa2931a1cc9cf79
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2020-11-23 (Mon, 23 Nov 2020)

  Changed paths:
    M mlir/lib/Dialect/SCF/SCF.cpp
    M mlir/test/Dialect/SCF/canonicalize.mlir

  Log Message:
  -----------
  [mlir] canonicalize away zero-iteration SCF for loops

An SCF 'for' loop does not iterate if its lower bound is equal to its upper
bound. Remove loops where both bounds are the same SSA value as such bounds are
guaranteed to be equal. Similarly, remove 'parallel' loops where at least one
pair of respective lower/upper bounds is specified by the same SSA value.

Reviewed By: gysit

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




More information about the All-commits mailing list