Extended Description
Please describe how to find out the information needed to let the optimizer work correct and adapted to the host machine when run via the C bindings to LLVM. I'll attach a C program that creates a small function, that shall be run in the JIT. As far as I understand, if I do not tell the target data to PassManager, then I get only generic optimizations. If I set the target data to something invalid (as in the outcommented AddTargetData) the optimizer even performs silently optimizations that are invalid for the host machine. (See http://llvm.org/bugs/show_bug.cgi?id=6394 for details.) Thus: How do I tell the LLVM optimizer to optimize with respect to the host, where I like to run the function in the JIT later?