Pass a flag whether we are in code emission phase.
Pass a flag whether we are in code emission phase.

When trying to bisect failing fusions with the new mlir emitters, we have the flags
xla_gpu_max_mlir_kernels and xla_gpu_skip_mlir_kernels. However the function
GetFusionEmitter() is also called during fusion passes. It seems we have some
non-determinism regarding how often it is called during fusion passes, so it is not
easy to determine what value should be used for xla_gpu_skip_mlir_kernels to skip
all the calls during fusion passes. Instead, better only start counting in the
code emission phase.
