-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[mlir][flang] Add an interface of OpenACC compute regions for further…
… getAllocaBlock support (#100675) This PR implements `ComputeRegionOpInterface` to define `getAllocaBlock` of OpenACC loop and compute constructs (parallel/kernels/serial). The primary objective here is to accommodate local variables in OpenACC compute regions. The change in `fir::FirOpBuilder::getAllocaBlock` allows local variable allocation inside loops and kernels.
- Loading branch information
Showing
9 changed files
with
56 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
//===-- OpenACCOpsInterfaces.td - OpenACC type interfaces ---*- tablegen -*-===// | ||
// | ||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | ||
// See https://llvm.org/LICENSE.txt for license information. | ||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
// | ||
//===----------------------------------------------------------------------===// | ||
|
||
#ifndef OPENACC_OPS_INTERFACES | ||
#define OPENACC_OPS_INTERFACES | ||
|
||
include "mlir/IR/OpBase.td" | ||
|
||
def ComputeRegionOpInterface : OpInterface<"ComputeRegionOpInterface"> { | ||
let cppNamespace = "::mlir::acc"; | ||
|
||
let description = [{ | ||
An interface for compute and loop construct operations. | ||
}]; | ||
|
||
let methods = [ | ||
InterfaceMethod<"Get alloca block", "::mlir::Block*", "getAllocaBlock", | ||
(ins), [{ | ||
return &$_op.getRegion().front(); | ||
}]>, | ||
]; | ||
} | ||
|
||
#endif // OPENACC_OPS_INTERFACES |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters