-
Notifications
You must be signed in to change notification settings - Fork 15.2k
[flang][OpenACC][NFC] remove legacy openacc-unwrap-fir-box option #160291
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@llvm/pr-subscribers-openacc @llvm/pr-subscribers-flang-fir-hlfir Author: None (jeanPerier) ChangesRemove I am working on a change that will map the acc data operation result to the symbol so that accesses to variables that appeared in data clauses inside a compute region are isolated from access to the variable outside the region (using different SSA value). This change will not work properly with the It would likely be technically possible to reconstruct the variable from the raw result. But this would add extra complexity to a legacy option. I think it is better to remove it, and to work on some pass to "unbox" as we can later (leveraging inlining). Patch is 269.61 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/160291.diff 10 Files Affected:
diff --git a/flang/lib/Lower/OpenACC.cpp b/flang/lib/Lower/OpenACC.cpp
index 07234663cbef6..4f5a1d6471757 100644
--- a/flang/lib/Lower/OpenACC.cpp
+++ b/flang/lib/Lower/OpenACC.cpp
@@ -44,12 +44,6 @@
#define DEBUG_TYPE "flang-lower-openacc"
-static llvm::cl::opt<bool> unwrapFirBox(
- "openacc-unwrap-fir-box",
- llvm::cl::desc(
- "Whether to use the address from fix.box in data clause operations."),
- llvm::cl::init(false));
-
static llvm::cl::opt<bool> generateDefaultBounds(
"openacc-generate-default-bounds",
llvm::cl::desc("Whether to generate default bounds for arrays."),
@@ -120,43 +114,6 @@ createDataEntryOp(fir::FirOpBuilder &builder, mlir::Location loc,
llvm::ArrayRef<mlir::Attribute> asyncOnlyDeviceTypes,
bool unwrapBoxAddr = false, mlir::Value isPresent = {}) {
mlir::Value varPtrPtr;
- // The data clause may apply to either the box reference itself or the
- // pointer to the data it holds. So use `unwrapBoxAddr` to decide.
- // When we have a box value - assume it refers to the data inside box.
- if (unwrapFirBox &&
- ((fir::isBoxAddress(baseAddr.getType()) && unwrapBoxAddr) ||
- fir::isa_box_type(baseAddr.getType()))) {
- if (isPresent) {
- mlir::Type ifRetTy =
- mlir::cast<fir::BaseBoxType>(fir::unwrapRefType(baseAddr.getType()))
- .getEleTy();
- if (!fir::isa_ref_type(ifRetTy))
- ifRetTy = fir::ReferenceType::get(ifRetTy);
- baseAddr =
- builder
- .genIfOp(loc, {ifRetTy}, isPresent,
- /*withElseRegion=*/true)
- .genThen([&]() {
- if (fir::isBoxAddress(baseAddr.getType()))
- baseAddr = fir::LoadOp::create(builder, loc, baseAddr);
- mlir::Value boxAddr =
- fir::BoxAddrOp::create(builder, loc, baseAddr);
- fir::ResultOp::create(builder, loc, mlir::ValueRange{boxAddr});
- })
- .genElse([&] {
- mlir::Value absent =
- fir::AbsentOp::create(builder, loc, ifRetTy);
- fir::ResultOp::create(builder, loc, mlir::ValueRange{absent});
- })
- .getResults()[0];
- } else {
- if (fir::isBoxAddress(baseAddr.getType()))
- baseAddr = fir::LoadOp::create(builder, loc, baseAddr);
- baseAddr = fir::BoxAddrOp::create(builder, loc, baseAddr);
- }
- retTy = baseAddr.getType();
- }
-
llvm::SmallVector<mlir::Value, 8> operands;
llvm::SmallVector<int32_t, 8> operandSegments;
@@ -246,46 +203,14 @@ static void createDeclareAllocFuncWithArg(mlir::OpBuilder &modBuilder,
llvm::SmallVector<mlir::Value> bounds;
std::stringstream asFortranDesc;
asFortranDesc << asFortran.str();
- if (unwrapFirBox)
- asFortranDesc << accFirDescriptorPostfix.str();
-
- // For descriptor, preserve old behavior when unwrapping FIR box: update.
- if (unwrapFirBox) {
- mlir::acc::UpdateDeviceOp updateDeviceOp =
- createDataEntryOp<mlir::acc::UpdateDeviceOp>(
- builder, loc, registerFuncOp.getArgument(0), asFortranDesc, bounds,
- /*structured=*/false, /*implicit=*/true,
- mlir::acc::DataClause::acc_update_device, descTy,
- /*async=*/{}, /*asyncDeviceTypes=*/{}, /*asyncOnlyDeviceTypes=*/{});
- llvm::SmallVector<int32_t> operandSegments{0, 0, 0, 1};
- llvm::SmallVector<mlir::Value> operands{updateDeviceOp.getResult()};
- createSimpleOp<mlir::acc::UpdateOp>(builder, loc, operands,
- operandSegments);
- } else {
- // New behavior: start a structured region with declare_enter.
- EntryOp descEntryOp = createDataEntryOp<EntryOp>(
- builder, loc, registerFuncOp.getArgument(0), asFortranDesc, bounds,
- /*structured=*/false, /*implicit=*/true, clause, descTy,
- /*async=*/{}, /*asyncDeviceTypes=*/{}, /*asyncOnlyDeviceTypes=*/{});
- mlir::acc::DeclareEnterOp::create(
- builder, loc,
- mlir::acc::DeclareTokenType::get(descEntryOp.getContext()),
- mlir::ValueRange(descEntryOp.getAccVar()));
- }
-
- if (unwrapFirBox) {
- mlir::Value desc =
- fir::LoadOp::create(builder, loc, registerFuncOp.getArgument(0));
- fir::BoxAddrOp boxAddrOp = fir::BoxAddrOp::create(builder, loc, desc);
- addDeclareAttr(builder, boxAddrOp.getOperation(), clause);
- EntryOp entryOp = createDataEntryOp<EntryOp>(
- builder, loc, boxAddrOp.getResult(), asFortran, bounds,
- /*structured=*/false, /*implicit=*/false, clause, boxAddrOp.getType(),
- /*async=*/{}, /*asyncDeviceTypes=*/{}, /*asyncOnlyDeviceTypes=*/{});
- mlir::acc::DeclareEnterOp::create(
- builder, loc, mlir::acc::DeclareTokenType::get(entryOp.getContext()),
- mlir::ValueRange(entryOp.getAccVar()));
- }
+ // Start a structured region with declare_enter.
+ EntryOp descEntryOp = createDataEntryOp<EntryOp>(
+ builder, loc, registerFuncOp.getArgument(0), asFortranDesc, bounds,
+ /*structured=*/false, /*implicit=*/true, clause, descTy,
+ /*async=*/{}, /*asyncDeviceTypes=*/{}, /*asyncOnlyDeviceTypes=*/{});
+ mlir::acc::DeclareEnterOp::create(
+ builder, loc, mlir::acc::DeclareTokenType::get(descEntryOp.getContext()),
+ mlir::ValueRange(descEntryOp.getAccVar()));
modBuilder.setInsertionPointAfter(registerFuncOp);
builder.restoreInsertionPoint(crtInsPt);
@@ -307,67 +232,32 @@ static void createDeclareDeallocFuncWithArg(
modBuilder, builder, loc, preDeallocFuncName.str(), {descTy}, {loc});
mlir::Value var = preDeallocOp.getArgument(0);
- if (unwrapFirBox) {
- mlir::Value loadOp =
- fir::LoadOp::create(builder, loc, preDeallocOp.getArgument(0));
- fir::BoxAddrOp boxAddrOp = fir::BoxAddrOp::create(builder, loc, loadOp);
- addDeclareAttr(builder, boxAddrOp.getOperation(), clause);
- var = boxAddrOp.getResult();
- }
llvm::SmallVector<mlir::Value> bounds;
- if (unwrapFirBox) {
- // Unwrap: delete device payload using getdeviceptr + declare_exit + ExitOp
- mlir::acc::GetDevicePtrOp entryOp =
- createDataEntryOp<mlir::acc::GetDevicePtrOp>(
- builder, loc, var, asFortran, bounds,
- /*structured=*/false, /*implicit=*/false, clause, var.getType(),
- /*async=*/{}, /*asyncDeviceTypes=*/{}, /*asyncOnlyDeviceTypes=*/{});
- mlir::acc::DeclareExitOp::create(builder, loc, mlir::Value{},
- mlir::ValueRange(entryOp.getAccVar()));
-
- if constexpr (std::is_same_v<ExitOp, mlir::acc::CopyoutOp> ||
- std::is_same_v<ExitOp, mlir::acc::UpdateHostOp>)
- ExitOp::create(builder, entryOp.getLoc(), entryOp.getAccVar(),
- entryOp.getVar(), entryOp.getVarType(),
- entryOp.getBounds(), entryOp.getAsyncOperands(),
- entryOp.getAsyncOperandsDeviceTypeAttr(),
- entryOp.getAsyncOnlyAttr(), entryOp.getDataClause(),
- /*structured=*/false, /*implicit=*/false,
- builder.getStringAttr(*entryOp.getName()));
- else
- ExitOp::create(builder, entryOp.getLoc(), entryOp.getAccVar(),
- entryOp.getBounds(), entryOp.getAsyncOperands(),
- entryOp.getAsyncOperandsDeviceTypeAttr(),
- entryOp.getAsyncOnlyAttr(), entryOp.getDataClause(),
- /*structured=*/false, /*implicit=*/false,
- builder.getStringAttr(*entryOp.getName()));
- } else {
- mlir::acc::GetDevicePtrOp entryOp =
- createDataEntryOp<mlir::acc::GetDevicePtrOp>(
- builder, loc, var, asFortran, bounds,
- /*structured=*/false, /*implicit=*/false, clause, var.getType(),
- /*async=*/{}, /*asyncDeviceTypes=*/{}, /*asyncOnlyDeviceTypes=*/{});
- mlir::acc::DeclareExitOp::create(builder, loc, mlir::Value{},
- mlir::ValueRange(entryOp.getAccVar()));
-
- if constexpr (std::is_same_v<ExitOp, mlir::acc::CopyoutOp> ||
- std::is_same_v<ExitOp, mlir::acc::UpdateHostOp>)
- ExitOp::create(builder, entryOp.getLoc(), entryOp.getAccVar(),
- entryOp.getVar(), entryOp.getVarType(),
- entryOp.getBounds(), entryOp.getAsyncOperands(),
- entryOp.getAsyncOperandsDeviceTypeAttr(),
- entryOp.getAsyncOnlyAttr(), entryOp.getDataClause(),
- /*structured=*/false, /*implicit=*/false,
- builder.getStringAttr(*entryOp.getName()));
- else
- ExitOp::create(builder, entryOp.getLoc(), entryOp.getAccVar(),
- entryOp.getBounds(), entryOp.getAsyncOperands(),
- entryOp.getAsyncOperandsDeviceTypeAttr(),
- entryOp.getAsyncOnlyAttr(), entryOp.getDataClause(),
- /*structured=*/false, /*implicit=*/false,
- builder.getStringAttr(*entryOp.getName()));
- }
+ mlir::acc::GetDevicePtrOp entryOp =
+ createDataEntryOp<mlir::acc::GetDevicePtrOp>(
+ builder, loc, var, asFortran, bounds,
+ /*structured=*/false, /*implicit=*/false, clause, var.getType(),
+ /*async=*/{}, /*asyncDeviceTypes=*/{}, /*asyncOnlyDeviceTypes=*/{});
+ mlir::acc::DeclareExitOp::create(builder, loc, mlir::Value{},
+ mlir::ValueRange(entryOp.getAccVar()));
+
+ if constexpr (std::is_same_v<ExitOp, mlir::acc::CopyoutOp> ||
+ std::is_same_v<ExitOp, mlir::acc::UpdateHostOp>)
+ ExitOp::create(builder, entryOp.getLoc(), entryOp.getAccVar(),
+ entryOp.getVar(), entryOp.getVarType(), entryOp.getBounds(),
+ entryOp.getAsyncOperands(),
+ entryOp.getAsyncOperandsDeviceTypeAttr(),
+ entryOp.getAsyncOnlyAttr(), entryOp.getDataClause(),
+ /*structured=*/false, /*implicit=*/false,
+ builder.getStringAttr(*entryOp.getName()));
+ else
+ ExitOp::create(builder, entryOp.getLoc(), entryOp.getAccVar(),
+ entryOp.getBounds(), entryOp.getAsyncOperands(),
+ entryOp.getAsyncOperandsDeviceTypeAttr(),
+ entryOp.getAsyncOnlyAttr(), entryOp.getDataClause(),
+ /*structured=*/false, /*implicit=*/false,
+ builder.getStringAttr(*entryOp.getName()));
// Generate the post dealloc function.
modBuilder.setInsertionPointAfter(preDeallocOp);
@@ -378,33 +268,14 @@ static void createDeclareDeallocFuncWithArg(
modBuilder, builder, loc, postDeallocFuncName.str(), {descTy}, {loc});
var = postDeallocOp.getArgument(0);
- if (unwrapFirBox) {
- var = fir::LoadOp::create(builder, loc, postDeallocOp.getArgument(0));
- asFortran << accFirDescriptorPostfix.str();
- }
-
- if (unwrapFirBox) {
- // Old behavior: update descriptor after deallocation.
- mlir::acc::UpdateDeviceOp updateDeviceOp =
- createDataEntryOp<mlir::acc::UpdateDeviceOp>(
- builder, loc, var, asFortran, bounds,
- /*structured=*/false, /*implicit=*/true,
- mlir::acc::DataClause::acc_update_device, var.getType(),
- /*async=*/{}, /*asyncDeviceTypes=*/{}, /*asyncOnlyDeviceTypes=*/{});
- llvm::SmallVector<int32_t> operandSegments{0, 0, 0, 1};
- llvm::SmallVector<mlir::Value> operands{updateDeviceOp.getResult()};
- createSimpleOp<mlir::acc::UpdateOp>(builder, loc, operands,
- operandSegments);
- } else {
- // New behavior: end structured region with declare_exit.
- mlir::acc::GetDevicePtrOp postEntryOp =
- createDataEntryOp<mlir::acc::GetDevicePtrOp>(
- builder, loc, var, asFortran, bounds,
- /*structured=*/false, /*implicit=*/true, clause, var.getType(),
- /*async=*/{}, /*asyncDeviceTypes=*/{}, /*asyncOnlyDeviceTypes=*/{});
- mlir::acc::DeclareExitOp::create(builder, loc, mlir::Value{},
- mlir::ValueRange(postEntryOp.getAccVar()));
- }
+ // End structured region with declare_exit.
+ mlir::acc::GetDevicePtrOp postEntryOp =
+ createDataEntryOp<mlir::acc::GetDevicePtrOp>(
+ builder, loc, var, asFortran, bounds,
+ /*structured=*/false, /*implicit=*/true, clause, var.getType(),
+ /*async=*/{}, /*asyncDeviceTypes=*/{}, /*asyncOnlyDeviceTypes=*/{});
+ mlir::acc::DeclareExitOp::create(builder, loc, mlir::Value{},
+ mlir::ValueRange(postEntryOp.getAccVar()));
modBuilder.setInsertionPointAfter(postDeallocOp);
builder.restoreInsertionPoint(crtInsPt);
}
@@ -780,7 +651,7 @@ genDataOperandOperations(const Fortran::parser::AccObjectList &objectList,
mlir::acc::DataBoundsOp, mlir::acc::DataBoundsType>(
converter, builder, semanticsContext, stmtCtx, symbol, designator,
operandLocation, asFortran, bounds,
- /*treatIndexAsSection=*/true, /*unwrapFirBox=*/unwrapFirBox,
+ /*treatIndexAsSection=*/true, /*unwrapFirBox=*/false,
/*genDefaultBounds=*/generateDefaultBounds,
/*strideIncludeLowerExtent=*/strideIncludeLowerExtent);
LLVM_DEBUG(llvm::dbgs() << __func__ << "\n"; info.dump(llvm::dbgs()));
@@ -839,7 +710,7 @@ static void genDeclareDataOperandOperations(
mlir::acc::DataBoundsOp, mlir::acc::DataBoundsType>(
converter, builder, semanticsContext, stmtCtx, symbol, designator,
operandLocation, asFortran, bounds,
- /*treatIndexAsSection=*/true, /*unwrapFirBox=*/unwrapFirBox,
+ /*treatIndexAsSection=*/true, /*unwrapFirBox=*/false,
/*genDefaultBounds=*/generateDefaultBounds,
/*strideIncludeLowerExtent=*/strideIncludeLowerExtent);
LLVM_DEBUG(llvm::dbgs() << __func__ << "\n"; info.dump(llvm::dbgs()));
@@ -1409,7 +1280,7 @@ static void genPrivatizationRecipes(
mlir::acc::DataBoundsOp, mlir::acc::DataBoundsType>(
converter, builder, semanticsContext, stmtCtx, symbol, designator,
operandLocation, asFortran, bounds,
- /*treatIndexAsSection=*/true, /*unwrapFirBox=*/unwrapFirBox,
+ /*treatIndexAsSection=*/true, /*unwrapFirBox=*/false,
/*genDefaultBounds=*/generateDefaultBounds,
/*strideIncludeLowerExtent=*/strideIncludeLowerExtent);
LLVM_DEBUG(llvm::dbgs() << __func__ << "\n"; info.dump(llvm::dbgs()));
@@ -1842,7 +1713,7 @@ genReductions(const Fortran::parser::AccObjectListWithReduction &objectList,
mlir::acc::DataBoundsOp, mlir::acc::DataBoundsType>(
converter, builder, semanticsContext, stmtCtx, symbol, designator,
operandLocation, asFortran, bounds,
- /*treatIndexAsSection=*/true, /*unwrapFirBox=*/unwrapFirBox,
+ /*treatIndexAsSection=*/true, /*unwrapFirBox=*/false,
/*genDefaultBounds=*/generateDefaultBounds,
/*strideIncludeLowerExtent=*/strideIncludeLowerExtent);
LLVM_DEBUG(llvm::dbgs() << __func__ << "\n"; info.dump(llvm::dbgs()));
@@ -4052,45 +3923,15 @@ static void createDeclareAllocFunc(mlir::OpBuilder &modBuilder,
asFortran << Fortran::lower::mangle::demangleName(globalOp.getSymName());
std::stringstream asFortranDesc;
asFortranDesc << asFortran.str();
- if (unwrapFirBox)
- asFortranDesc << accFirDescriptorPostfix.str();
llvm::SmallVector<mlir::Value> bounds;
- // For unwrapFirBox=false this remains declare_enter; for unwrapFirBox=true,
- // the descriptor post-alloc remains update behavior.
- if (unwrapFirBox) {
- mlir::acc::UpdateDeviceOp updDesc =
- createDataEntryOp<mlir::acc::UpdateDeviceOp>(
- builder, loc, addrOp, asFortranDesc, bounds,
- /*structured=*/false, /*implicit=*/true,
- mlir::acc::DataClause::acc_update_device, addrOp.getType(),
- /*async=*/{}, /*asyncDeviceTypes=*/{}, /*asyncOnlyDeviceTypes=*/{});
- llvm::SmallVector<int32_t> seg{0, 0, 0, 1};
- llvm::SmallVector<mlir::Value> ops{updDesc.getResult()};
- createSimpleOp<mlir::acc::UpdateOp>(builder, loc, ops, seg);
- } else {
- EntryOp descEntryOp = createDataEntryOp<EntryOp>(
- builder, loc, addrOp, asFortranDesc, bounds,
- /*structured=*/false, /*implicit=*/true, clause, addrOp.getType(),
- /*async=*/{}, /*asyncDeviceTypes=*/{}, /*asyncOnlyDeviceTypes=*/{});
- mlir::acc::DeclareEnterOp::create(
- builder, loc,
- mlir::acc::DeclareTokenType::get(descEntryOp.getContext()),
- mlir::ValueRange(descEntryOp.getAccVar()));
- }
-
- if (unwrapFirBox) {
- auto loadOp = fir::LoadOp::create(builder, loc, addrOp.getResult());
- fir::BoxAddrOp boxAddrOp = fir::BoxAddrOp::create(builder, loc, loadOp);
- addDeclareAttr(builder, boxAddrOp.getOperation(), clause);
- EntryOp entryOp = createDataEntryOp<EntryOp>(
- builder, loc, boxAddrOp.getResult(), asFortran, bounds,
- /*structured=*/false, /*implicit=*/false, clause, boxAddrOp.getType(),
- /*async=*/{}, /*asyncDeviceTypes=*/{}, /*asyncOnlyDeviceTypes=*/{});
- mlir::acc::DeclareEnterOp::create(
- builder, loc, mlir::acc::DeclareTokenType::get(entryOp.getContext()),
- mlir::ValueRange(entryOp.getAccVar()));
- }
+ EntryOp descEntryOp = createDataEntryOp<EntryOp>(
+ builder, loc, addrOp, asFortranDesc, bounds,
+ /*structured=*/false, /*implicit=*/true, clause, addrOp.getType(),
+ /*async=*/{}, /*asyncDeviceTypes=*/{}, /*asyncOnlyDeviceTypes=*/{});
+ mlir::acc::DeclareEnterOp::create(
+ builder, loc, mlir::acc::DeclareTokenType::get(descEntryOp.getContext()),
+ mlir::ValueRange(descEntryOp.getAccVar()));
modBuilder.setInsertionPointAfter(registerFuncOp);
}
@@ -4108,56 +3949,6 @@ static void createDeclareDeallocFunc(mlir::OpBuilder &modBuilder,
std::stringstream asFortran;
asFortran << Fortran::lower::mangle::demangleName(globalOp.getSymName());
- // If FIR box semantics are being unwrapped, then a pre-dealloc function
- // needs generated to ensure to delete the device data pointed to by the
- // descriptor before this information is lost.
- if (unwrapFirBox) {
- // Generate the pre dealloc function.
- std::stringstream preDeallocFuncName;
- preDeallocFuncName << globalOp.getSymName().str()
- << Fortran::lower::declarePreDeallocSuffix.str();
- auto preDeallocOp =
- createDeclareFunc(modBuilder, builder, loc, preDeallocFuncName.str());
-
- fir::AddrOfOp addrOp = fir::AddrOfOp::create(
- builder, loc, fir::ReferenceType::get(globalOp.getType()),
- globalOp.getSymbol());
- auto loadOp = fir::LoadOp::create(builder, loc, addrOp.getResult());
- fir::BoxAddrOp boxAddrOp = fir::BoxAddrOp::create(builder, loc, loadOp);
- mlir::Value var = boxAddrOp.getResult();
- addDeclareAttr(builder, var.getDefiningOp(), clause);
-
- llvm::SmallVector<mlir::Value> bounds;
- mlir::acc::GetDevicePtrOp entryOp =
- createDataEntryOp<mlir::acc::GetDevicePtrOp>(
- builder, loc, var, asFortran, bounds,
- /*structured=*/false, /*implicit=*/false, clause, var.getType(),
- /*async=*/{}, /*asyncDeviceTypes=*/{}, /*asyncOnlyDeviceTypes=*/{});
-
- mlir::acc::DeclareExitOp::create(builder, loc, mlir::Value{},
- mlir::ValueRange(entryOp.getAccVar()));
-
- if constexpr (std::is_same_v<ExitOp, mlir::acc::CopyoutOp> ||
- std::is_same_v<ExitOp, mlir::acc::UpdateHostOp>)
- ExitOp::create(builder, entryOp.getLoc(), entryOp.getAccVar(),
- entryOp.getVar(), entryOp.getBounds(),
- entryOp.getAsyncOperands(),
- entryOp.getAsyncOperandsDeviceTypeAttr(),
- entryOp.getAsyncOnlyAttr(), entryOp.getDataClause(),
- /*structured=*/false, /*implicit=*/false,
- builder.getStringAttr(*entryOp.getName()));
- else
- ExitOp::create(builder, entryOp.getLoc(), entryOp.getAccVar(),
- entryOp.getBounds(), entryOp.getAsyncOperands(),
- entryOp.getAsyncOperandsDeviceTypeAttr(),
- entryOp.getAsyncOnlyAttr(), en...
[truncated]
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
Remove
openacc-unwrap-fir-box
.I am working on a change that will map the acc data operation result to the symbol so that accesses to variables that appeared in data clauses inside a compute region are isolated from access to the variable outside the region (using different SSA value).
This change will not work properly with the
openacc-unwrap-fir-box
option that make the data operation result/operand a raw pointer, even in cases where more information about the variable is needed to later work with it.It would likely be technically possible to reconstruct the variable from the raw result. But this would add extra complexity to a legacy option. I think it is better to remove it, and to work on some pass to "unbox" as we can later (leveraging inlining).