Currently -fcuda-disable-target-call-checks option enables parsing of code that calls across host/device boundary.
However, we don't emit any IR for functions that don't have attributes appropriate for the current compilation mode, so such cross-calls always fail at runtime due to unresolved references.
The patch allows CodeGen to emit non-matching functions if they are needed to resolve references in the current module.
This feature is enabled by -fcuda-disable-target-call-checks
The patch makes it possible for device side to use host unmodified includes that provide unattributed functions.
For instance, it allows use of larger subset of standard C++ library headers.