[all-commits] [llvm/llvm-project] 8d24b7: [flang][LoopVersioning] support reboxed operands

Tom Eccles via All-commits all-commits at lists.llvm.org
Wed Aug 23 03:11:44 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8d24b7322ee55eb780fc8115bfa8af07b6ee66b7
      https://github.com/llvm/llvm-project/commit/8d24b7322ee55eb780fc8115bfa8af07b6ee66b7
  Author: Tom Eccles <tom.eccles at arm.com>
  Date:   2023-08-23 (Wed, 23 Aug 2023)

  Changed paths:
    M flang/lib/Optimizer/Transforms/LoopVersioning.cpp
    M flang/test/Transforms/loop-versioning.fir

  Log Message:
  -----------
  [flang][LoopVersioning] support reboxed operands

Since https://reviews.llvm.org/D158119, many boxes lowered via HLFIR are
reboxed with better lower bounds information after they are declared.

For the loop versioning pass to support FIR lowered via HLFIR, it needs
to dereference fir.rebox operations to figure out that the variable was
a function argument.

I decided to modify the existing dereferencing of fir.declare so that
the declared/reboxed value is used in the versioned loop instead of the
function argument. This makes it easier for the improved lower bounds
information to be accessed. In doing this, I changed ArgInfo to store
ArgInfo::arg by value instead of by pointer because mlir::Value has
value-type semantics.

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




More information about the All-commits mailing list