[llvm] [OpenMPOpt] Initialize OpenMPIRBuilderConfig::IsGPU flag (PR #104456)

Sergio Afonso via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 19 02:31:20 PDT 2024


skatrak wrote:

> The change is fine but I wonder in what cases the assertion can be triggered.

Thank you @shiltian for giving this a look. At the moment it would be difficult (maybe impossible?) to trigger, since `OpenMPIRBuilder::isGPU()` is barely called at all. We do have downstream features (which we plan on upstreaming hopefully soon) that introduce more uses of that flag within the OMPIRBuilder, and those do trigger the assertion if it's not initialized by the OpenMPOpt pass.

Even if the assert doesn't currently trigger, I think it's worth making sure this property is initialized since it's a bit of a hidden bug.

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


More information about the llvm-commits mailing list