[flang-commits] [flang] [flang][OpenMP] Add alias analysis for omp private (PR #113566)
Tom Eccles via flang-commits
flang-commits at lists.llvm.org
Fri Oct 25 06:18:45 PDT 2024
================
@@ -372,6 +372,36 @@ getAttrsFromVariable(fir::FortranVariableOpInterface var) {
return attrs;
}
+static std::optional<omp::BlockArgOpenMPOpInterface>
+getOpenMPBlockArgInterface(Operation *op) {
+ if (!op)
+ return {};
+ return dyn_cast<omp::BlockArgOpenMPOpInterface>(op);
----------------
tblah wrote:
nit: this can be simpler (maybe we don't need the helper now?)
```suggestion
return dyn_cast_if_present<omp::BlockArgOpenMPOpInterface>(op);
```
https://llvm.org/docs/ProgrammersManual.html#the-isa-cast-and-dyn-cast-templates
https://github.com/llvm/llvm-project/pull/113566
More information about the flang-commits
mailing list