[LLVMdev] Module::getOrInsertFunction determinism

Tim Northover t.p.northover at gmail.com
Thu May 29 11:06:00 PDT 2014


Hi Tomek,

> I’ve got a question about Module::getOrInsertFunction().
> I got an impression that it is not deterministic where exactly in the bit
> code module the new function will be inserted.

Looking at the code (not exhaustively), it seems a new function will
always be added to the end of a module.

Documenting that probably wouldn't be a terrible idea, but it
shouldn't affect anything except the human-readability of LLVM IR. Are
you trying to do something where it is actually causing problems?

Cheers.

Tim.




More information about the llvm-dev mailing list