[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
Loading
Please sign in to comment