Register allocation and target code generation