[mlir][acc] Add ACCIfClauseLowering pass (#173573)

This pass lowers OpenACC compute constructs with `if` clauses into
`scf.if` with separate device and host paths.

Before:
```
  %d = acc.copyin varPtr(%a : memref<10xf32>) -> memref<10xf32>
  acc.parallel dataOperands(%d) if(%cond) {
    acc.loop control(%i : i32) = (%c0 : i32) to (%c10 : i32) step (%c1 :
i32) {
      // loop body
      acc.yield
    }
    acc.yield
  }
  acc.copyout accPtr(%d) to varPtr(%a)
```

After:
```
  scf.if %cond {
    %d = acc.copyin varPtr(%a : memref<10xf32>) -> memref<10xf32>
    acc.parallel dataOperands(%d) {
      acc.loop control(%i : i32) = (%c0 : i32) to (%c10 : i32) step (%c1
: i32) {
        // loop body
        acc.yield
      }
      acc.yield
    }
    acc.copyout accPtr(%d) to varPtr(%a)
  } else {
    scf.for %i = %c0 to %c10 step %c1 {
      // loop body
    }
  }
```

Co-authored-by: Susan Tan <zujunt@nvidia.com>
GitOrigin-RevId: 30166796e8286d96f813dcb6668930dc2427a0d0
4 files changed
tree: 7a0ea3dcb23bae65733697c7d17b33ebb4e7e03c
  1. benchmark/
  2. cmake/
  3. docs/
  4. examples/
  5. include/
  6. lib/
  7. python/
  8. test/
  9. tools/
  10. unittests/
  11. utils/
  12. .clang-format
  13. .clang-tidy
  14. CMakeLists.txt
  15. LICENSE.TXT
  16. Maintainers.md
  17. README.md
README.md

Multi-Level Intermediate Representation

See https://mlir.llvm.org/ for more information.