gpu: create ppcg_kernel objects before the AST generation
In the end, we want to construct a single schedule tree that contains
both the host and the device code. The analysis of the kernels
is currently performed within the leaves of the host code AST generation.
We start by creating the ppcg_kernel object up front so that we can
move the analysis of the kernels before the AST generation.
gen->kernel_id now no longer refers to the sequence number
of the current kernel inside create_host_leaf since all kernels
have now been created before any create_host_leaf call.
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>