In general, you cannot at the moment. The TPU compiler is a closed-source black box, although most of the front-end HLO passes are the same ones as in open source XLA. You could add additional compiler passes that rewrite the HLO *before* the HLO is passed to the TPU compiler, but everything after that point is closed source and not user-accessible. For example, JAX runs a few MHLO lowering passes before converting MHLO to HLO and compiling it with, e.g., the TPU compiler.
I'm sure we'd be interested to hear more about the use case, though. Is it something that could be done with an HLO->HLO rewrite, ideally early in the compilation flow?
Peter