On 12.03.21 13:20, Jakub Jelinek wrote: > On Wed, Mar 10, 2021 at 03:20:42PM +0100, Tobias Burnus wrote: >> The C/C++ FE sets for an 'omp declare target' ... 'omp end declare target' >> the attribute 'omp declare target implicit'. >> >> That's later processed (for C++) in decl.c - which remove that attribute >> and either keeps and explicit 'omp declare target' or 'omp declare target link' >> attribute. >> >> Unfortunately, adding 'omp declare target' comes too late as the varpool >> has been generated. >> >> Looking attributes on every get rather than just once is IMHO too expensive. >> For explicit declare target, we use: >> ... >> (e.g. from cp/parser.c). >> So, I think it would be better to do the same thing I concur. I was already wondering whether it should be in the FE or not, thinking about some separation between FE and ME. But given the precedent and the performance issue, it surely makes sense to solve it in c*/*decl.c. Done now. OK for mainline? Tobias ----------------- Mentor Graphics (Deutschland) GmbH, Arnulfstrasse 201, 80634 München Registergericht München HRB 106955, Geschäftsführer: Thomas Heurung, Frank Thürauf