Hi, just a remark regarding OpenMP. With
...omp ... firstprivate(var) allocator(omp_const_mem_alloc: var) one can also create constant memory in OpenMP. Likewise with a custom allocator that uses the memory space omp_const_mem_space, which is then a run-time thing. I don't think that's particular useful on the host as the !PROT_WRITE property is a memory-page thing which requires to allocate a multiple of a page size (and after writing the value, mprotect can make it read only). But I think it can be useful on the device (cf. OpenACC). OpenMP and OpenACC likely differ in terms of whether an entry is in the mapping table (firstprivate vs copy) and in the ref count. In any case, it would be good to have the code written such that both OpenACC's and OpenMP's use case can share as much code as possible, even if only OpenACC is initially supported. Tobias PS: I should eventually have a closer look at your patch! On 10.07.23 20:33, Chung-Lin Tang wrote:
this patch contains support for the 'readonly' modifier in copyin clauses and the cache directive. As we discussed earlier, the work for actually linking this to middle-end points-to analysis is a somewhat non-trivial issue. This first patch allows the language feature to be used in OpenACC directives first (with no effect for now). The middle-end changes are probably going to be a later patch.
----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955