[PATCH] D139287: [OpenMP] Introduce basic JIT support to OpenMP target offloading

Hansang Bae via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 6 07:07:22 PST 2023


hbae added a comment.

In D139287#4031473 <https://reviews.llvm.org/D139287#4031473>, @jhuber6 wrote:

> In D139287#4031469 <https://reviews.llvm.org/D139287#4031469>, @hbae wrote:
>
>> Looks like GCC 7.5 cannot build LLVM after this change. Could you please take a look?
>>
>>   In file included from /localdisk/hbae/LLVM/llvm-base/openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.cpp:11:0:
>>   /localdisk/hbae/LLVM/llvm-base/openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.h: In member function ‘virtual llvm::Expected<std::unique_ptr<llvm::MemoryBuffer> > llvm::omp::target::plugin::GenericDeviceTy::doJITPostProcessing(std::unique_ptr<llvm::MemoryBuffer>) const’:
>>   /localdisk/hbae/LLVM/llvm-base/openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.h:389:12: error: could not convert ‘MB’ from ‘std::unique_ptr<llvm::MemoryBuffer>’ to ‘llvm::Expected<std::unique_ptr<llvm::MemoryBuffer> >’
>>        return MB;
>>               ^~
>
> Some older GCC's have problem with the implicit move on copy elision AFAIK. I'll add a `std::move` and let me know if that fixes it.

Yes, that fixes it. We have two more places in JIT.cpp (line 126, 185).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D139287/new/

https://reviews.llvm.org/D139287



More information about the cfe-commits mailing list