[Mlir-commits] [mlir] [MLIR][OpenMP] Prevent loop wrapper translation crashes (PR #115475)

Sergio Afonso llvmlistbot at llvm.org
Fri Nov 8 05:33:12 PST 2024


skatrak wrote:

Thanks @kiranchandramohan for the quick review!

> Can we write a test for this?

At the moment we can't because this code path is not triggered by anything. Translation functions for loop wrappers currently call this function passing the region of the nested `omp.loop_nest`, so a loop wrapper region is never passed here. However, if you check the code directly below you can tell that this is doing the same thing as if an `omp.terminator` was present.

I think it's preferable to have this implemented before needing it rather than having it crash later on, since I think it was an oversight from when I implemented #112229. But let me know if you don't agree and I can keep it around until some composite construct lowering ends up triggering the issue.

https://github.com/llvm/llvm-project/pull/115475


More information about the Mlir-commits mailing list