Move codegen to Compiler class

Signed-off-by: Pekka Enberg <penberg@kernel.org>