aboutsummaryrefslogtreecommitdiff
path: root/lldb/packages/Python/lldbsuite/test
diff options
context:
space:
mode:
authorSergio Afonso <safonsof@amd.com>2025-03-12 11:50:12 +0000
committerGitHub <noreply@github.com>2025-03-12 11:50:12 +0000
commit032f83b743b7783483b380f422dbc2f10fab71ee (patch)
tree4c8cabc8e09273344a8442990eff0ffda474afa1 /lldb/packages/Python/lldbsuite/test
parentc851ee38ad457a98c2c3cd1e88ec74b2eb7f8582 (diff)
downloadllvm-032f83b743b7783483b380f422dbc2f10fab71ee.zip
llvm-032f83b743b7783483b380f422dbc2f10fab71ee.tar.gz
llvm-032f83b743b7783483b380f422dbc2f10fab71ee.tar.bz2
[MLIR][OpenMP] Enable BlockArgOpenMPOpInterface accessing operands (#130769)
This patch makes additions to the `BlockArgOpenMPOpInterface` to simplify its use by letting it handle the matching between operands and their associated entry block arguments. Most significantly, the following is now possible: ```c++ SmallVector<std::pair<Value, BlockArgument>> pairs; cast<BlockArgOpenMPOpInterface>(op).getBlockArgsPairs(pairs); for (auto [var, arg] : pairs) { // var points to the operand (outside value) and arg points to the entry // block argument associated to that value. } ``` This is achieved by making the interface define and use `getXyzVars()` methods, which by default return empty `OperandRange`s and are overriden by getters automatically produced for the `Variadic<...> $xyz_vars` tablegen argument of the corresponding clause. These definitions can then be simplified, since they no longer need to manually define `numXyzBlockArgs` functions as a result. A side-effect of this is that all ops implementing this interface will now publicly define `getXyzVars()` functions for all entry block argument-generating clauses, even if they don't actually accept all clauses. However, these would just return empty ranges, so it shouldn't cause issues. This change uncovered some incorrect definitions of class declarations related to the `ReductionClauseInterface`, and the `OpenMP_DetachClause` incorrectly implementing the `BlockArgOpenMPOpInterface`, so these issues are also addressed.
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test')
0 files changed, 0 insertions, 0 deletions