[LLVMdev] range of Value's and codegening constant pools

Nuno Lopes nunoplopes at sapo.pt
Mon Oct 26 13:16:56 PDT 2009


Hi,

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 :)

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,
Nuno 




More information about the llvm-dev mailing list