LiveValues removal

I’ve read that LiveValues has been removed from trunk. Did it bitrot or was simply removed because a replacement is available?
If it’s the former, what caused the bitrotting? If it’s the latter, what’s the replacement? (I’ve found LiveVariables but I’m not sure it can be used in a ModulePass).

LiveVariables is the optimized and tested way to get variable liveness information (it’s used by register allocation). Unfortunately it requires a MachineFunction to work - so you’ll either need to lower to one of the built-in targets or add your own target to acquire access to this pass.


I just realized that I actually need something looser than LiveValues. I just need to know, at the begining of a BB, the list of values defined in the predecessor(s). If there are multiple predecessors it’s easy (I just iterate over the PHIs and get all I need to know there), but I’m kind of stuck on how to do it when there’s a single predecessor, i.e. there are no PHIs.
How is this problem dealt with internally by LLVM?

Is it possible to lower to a target from a ModulePass just to get the LiveVariables?