On Wed, Dec 19, 2018 at 03:03:42PM +0100, Jakub Jelinek wrote: > On Wed, Dec 19, 2018 at 02:59:54PM +0100, Thomas Schwinge wrote: > > Right. For OpenACC, there's no "device" clause, so we only ever passed > > in "GOMP_DEVICE_ICV" (default), or "GOMP_DEVICE_HOST_FALLBACK" ("if > > (false)" clause). Therefore, the libgomp "resolve_legacy_flags" function > > added to make sure that these two values (as used by old executables) > > continue to work as before (with new libgomp). (And, we have to make > > sure that no (new) "GOACC_FLAG_*" combination ever results in these > > values; will document that.) > > > > I'm currently doing a verification run of the libgomp testsuite (had one > > detail botched up in the patch that I sent). > > > > And just to make sure: as recently discussed in a different thread, we > > don't have to support the case of new executables built that are > > dynamically linking against old libgomp versions (where the latter won't > > understand the new "flags" value "GOACC_FLAG_HOST_FALLBACK", would ignore > > that flag). > > LGTM then in principle.
Or keep it int and use inverted bitmask, thus when bit is 1, it represents the default state and when bit is 0, it is something different from it. If you passed before just -1 and -2 and because we are only supporting two's complement, the host fallback test would be (flags & 1) == 0. Then you don't need to at runtime transform from legacy to non-legacy. Jakub