range of Value's and codegening constant pools


I've two questions about llvm. The first one I already asked some time ago, but since I didn't track the last year of development, I'll ask again if you don't mind :slight_smile:

The first one is: does llvm already has an analysis pass that, given a Value*, returns a ConstantRange? i.e., a pass that can determine the value range of expressions. There is already the ConstantRange ADT, but I couldn't find any use of it to implement what I've just described.
If this not available, is there any interest that I contribute this code back (since I'll need it in near feature)?

My second question is: where can I add an optimization that rewrites the constant pools? i.e., a pass that receives the contents of say .rodata and shuffles the whole thing, and returns back the new constant section plus the new indexes for the data. Maybe putting this somewhere in the AsmPrinter or MCE is the best option, as I need to get hold of the raw binary data + alignment information.

Thanks in advance,