[LLVMdev] Whole program compile/link
aaronngray.lists at googlemail.com
Sun Jul 26 05:56:02 PDT 2009
> I have a little conundrum. I want to bitcode link a whole program, but
> I've run into a roadblock. During code generation on a processor that
> doesn't support e.g. floating point, a floating point mul is turned into
> a function call. This isn't known at bitcode linking time so the
> appropriate bitcode for the mul isn't linked.
> Is there a pass I can run that will do the appropriate conversion to the
> bitcode so that I can get the bitcode mul pulled in?
> I suppose that an option would be to put the support stuff in a file
> that is linked in always and let the optimizer drop functions that
> aren't referenced. :-(
LLVM bitcode is not target neutral. The olny wey I can think of doing these
sorts of things is to miss the lowering stanges when generating .bc files,
then on linking them do the lowering. But there are probably other target
sppecific issues to deal with too.
More information about the llvm-dev