================
@@ -6872,35 +6883,6 @@ void OpenMPIRBuilder::loadOffloadInfoMetadata(StringRef 
HostFilePath) {
   loadOffloadInfoMetadata(*M.get());
 }
 
-Function *OpenMPIRBuilder::createRegisterRequires(StringRef Name) {
----------------
skatrak wrote:

Flang already picks up your changes to `createOffloadEntriesAndInfoMetadata()` 
and it appears to be putting the corresponding flags into a structure, though 
I'm not sure it's the right one.

I ran `flang-new -fc1 -emit-llvm -fopenmp flang/test/Lower/OpenMP/requires.f90 
-o -` for a simple test with a single target region and I'm seeing two 
offloading entries being produced, which I'm not sure whether it's expected 
behavior. It looks like only one of them has the requires flags and the other 
one is the one that's properly linked with the kernel.

```llvmir
@.omp_offloading.entry_name = internal unnamed_addr constant [43 x i8] 
c"__omp_offloading_10307_d2a215c__QQmain_l12\00"
@.omp_offloading.entry.__omp_offloading_10307_d2a215c__QQmain_l12 = weak 
constant %struct.__tgt_offload_entry { ptr 
@.__omp_offloading_10307_d2a215c__QQmain_l12.region_id, ptr 
@.omp_offloading.entry_name, i64 0, i32 0, i32 0 }, section 
"omp_offloading_entries", align 1

@.omp_offloading.entry_name.1 = internal unnamed_addr constant [1 x i8] 
zeroinitializer
@.omp_offloading.entry. = weak constant %struct.__tgt_offload_entry { ptr null, 
ptr @.omp_offloading.entry_name.1, i64 0, i32 22, i32 10 }, section 
"omp_offloading_entries", align 1

...
%14 = call i32 @__tgt_target_kernel(ptr @1, i64 -1, i32 -1, i32 0, ptr 
@.__omp_offloading_10307_d2a215c__QQmain_l12.region_id, ptr %kernel_args)
```

https://github.com/llvm/llvm-project/pull/80460
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to