[LLVMdev] Changes in FunctionPassManager constructor

Christophe de Dinechin christophe at taodyne.com
Wed Feb 3 08:34:56 PST 2010


What guarantees does LLVM try to provide regarding source code compatibility?

Case in point: rev 94686 (http://llvm.org/viewvc/llvm-project?view=rev&revision=94686) breaks any code that creates a JIT. For example, we used to construct a FunctionPassManager with a ModuleProvider, it's now to be done with a Module. I cannot ship source code for my own project that is compatible with both pre-94686 and post-94686.

This seems to be relatively frequent in LLVM. My project is not very active, and it's relatively young, but I think this is the third time it hits us. At some point i had to add InitializeNativeTarget(). At some other point, I had to add "context" everywhere. And then there was another issue with globals that eludes me right now. Anyway, I have to assume that preserving source-code compatibility is a non-objective.

I could not find any documentation about what the "policy" for C++ is. The check-in for 94686 seems to suggest that the C bindings are somewhat preserved, but doesn't it make sense to provide some guarantees regarding the most frequently used C++ code?

Also note that the documentation is unintentionally misleading. It's very confusing for http://llvm.org/docs/tutorial/LangImpl4.html to show "Last modified: $Date: 2007-10-17 11:05:13 -0700 (Wed, 17 Oct 2007) $" at the bottom, as if nothing had changed since then, when the code it displays is actually less than a week old... I guess the source code snippets are updated automagically. As a result, the code shown there as an example will NOT compile on anything but a most recent LLVM, i.e. it will not work if you install LLVM with apt-get or MacPorts. I don't think that's desirable.

Opinions?


Christophe de Dinechin





More information about the llvm-dev mailing list