Changes in FunctionPassManager constructor

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

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

None.

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.

That's the docs for trunk; to get docs for a specific release, try,
for example, http://llvm.org/releases/2.6/docs/tutorial/LangImpl4.html
.

-Eli

Hi Christophe,

So this is a pain, but we are dealing with a pre-release. Until the 2.7 freeze the source should continue to churn.

Regards

Garrison

So, it looks like I mis-read this. You were referring to backward compatibility.

Garrison

Yes. What is the guideline for code that builds against 2.6 and 2.7?

Thanks
Christophe

And this is a good thing because... ?

Christophe

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.

That's the docs for trunk; to get docs for a specific release, try,
for example, http://llvm.org/releases/2.6/docs/tutorial/LangImpl4.html

These are the docs I get by default if I click on "documentation" then "Tutorial" then ... or if I use Google. How is a poor schmuck trying to build his first LLVM tool supposed to figure out that the documentation is not "the right one"?

Christophe

It avoids having to deal with backward compatibility cruft?

It's a pain for client code, but I suspect that for the long-term quality of the code base it's a useful decision.

  Daveed

Yep. I just added a warning like this to
http://llvm.org/docs/ReleaseNotes.html, but we should have one on the
top-level documentation. And quite possibly, the main website link
should be to the most recent release's documentation rather than to
trunk's documentation. I'll write a patch for the first problem.
Someone with cvs access will need to fix the website.

Salut David,

It avoids having to deal with backward compatibility cruft?

You can do that without presenting a self-rewriting web-site as your "tutorial", can't you?

It's a pain for client code, but I suspect that for the long-term quality of the code base it's a useful decision.

I have nothing against fixing LLVM. I have something against being unable to do any kind of regression testing because I need to massively change the test along with the library. That can't really help quality.

Thanks,
Christophe

This patch is in: http://llvm.org/docs/. Hopefully fewer people will
get confused about what version of the docs they're reading now.

This particular issue is now fixed. Unfortunately it means that all the
"Last modified" dates on those pages are now today rather than their last
real modification, but theoretically they should now stay current with
future changes.

Dan

That's much better. Thanks a lot.

Christophe