2.3 Pre-release available for testing

Just a reminder, please complete your testing by May 21st!

Thanks,
Tanya

I tested this pre-release on MSVC and I noted that none of the submitted patches (mine or others) were applied.
So the llvm 2.3 will not compile out of the box in MSVC?

Razvan

I tested this pre-release on MSVC and I noted that none of the submitted
patches (mine or others) were applied.
So the llvm 2.3 will not compile out of the box in MSVC?

Please provide me with a link to the patch(s) that need to be applied (llvm-commits archive email). I only apply patches that have been sent to me and approved by the various llvm code owners.

-Tanya

This is my patch for MSVC 2008 and it was applied by Chris:

http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20080512/062390.html

I tested it and it is ok for the 2.3 release.

Razvan

This is my patch for MSVC 2008 and it was applied by Chris:

http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20080512/062390.html

I tested it and it is ok for the 2.3 release.

I don't believe I can apply this patch. There have been several patches applied recently to TOT to allow MSVC 2005 which I think many people are using. Does this patch mean that one can only use MSVC 2008?

-Tanya

As I saw from the mailing list the MSVC 2005 patches were made to take into account the new files from the development branch, files which are not in the 2.3 release. So for now the below patch is the only one functional for the release. If I am wrong, please someone correct me.

If someone can make a 2005 patch for the release branch, it is ok. Else, I am afraid that this one is for now the only functional one, with the drawback that it is made for MSVC 2008. If there will be no other patches, the alternative is that the 2.3 release will not work with any MSVC.
Anyway, it is not so hard to sync the MSVC projects with the 2.3 release files and if someone with MSVC 2005 can do it, please do it.

Razvan

Razvan Aciu wrote:

As I saw from the mailing list the MSVC 2005 patches were made to take into account the new files from the development branch, files which are not in the 2.3 release. So for now the below patch is the only one functional for the release. If I am wrong, please someone correct me.

If someone can make a 2005 patch for the release branch, it is ok. Else, I am afraid that this one is for now the only functional one, with the drawback that it is made for MSVC 2008. If there will be no other patches, the alternative is that the 2.3 release will not work with any MSVC.
Anyway, it is not so hard to sync the MSVC projects with the 2.3 release files and if someone with MSVC 2005 can do it, please do it.

Ok, I got the release_23 branch and added/removed files until it would build without errors. I didn't have time to test the clang build, but at least this patch will make things compile so someone else can test it.

m.

PS. Visual Studio really hates how the operator new is overridden in User.h:42, you get thousands upon thousands of warnings of the form:

warning C4291: 'void *llvm::User::operator new(size_t,size_t)' : no matching operator delete found; memory will not be freed if initialization throws an exception

There's also quite a few other things you get warnings about, mixed use of struct/class for the same thing and conversions from 64 bit to 32 bit that are potentially unsafe. Also constantfolding.cpp has two functions that don't return a value (but have assert(0 && ...) at the end) at line 622 and 605 without calling abort() -- Visual Studio give warnings about other places that _do_ call abort() as well, but I guess that's fine.

release_23_vs2005.patch (7.29 KB)

Razvan Aciu wrote:
> As I saw from the mailing list the MSVC 2005 patches were made to take into
> account the new files from the development branch, files which are not in
> the 2.3 release. So for now the below patch is the only one functional for
> the release. If I am wrong, please someone correct me.

> If someone can make a 2005 patch for the release branch, it is ok. Else, I
> am afraid that this one is for now the only functional one, with the
> drawback that it is made for MSVC 2008. If there will be no other patches,
> the alternative is that the 2.3 release will not work with any MSVC.
> Anyway, it is not so hard to sync the MSVC projects with the 2.3 release
> files and if someone with MSVC 2005 can do it, please do it.

Ok, I got the release_23 branch and added/removed files until it would build without errors. I didn't have time to test
the clang build, but at least this patch will make things compile so someone else can test it.

m.

PS. Visual Studio really hates how the operator new is overridden in User.h:42, you get thousands upon thousands of
warnings of the form:

Can you please add this line just below "operator new":

  void operator delete(void*, unsigned) {}

Rationale: this operator is only needed when the constructor
*actually throws an exception*.

Since VMCore library does not even use exceptions (it is compiled
without exceptions on gcc platforms), this "operator delete" will
never be called, and thus may be defined as empty.

Morten, if you could send this as a patch (User.h.diff only) to llvm-
commits that would be cool. Also please tell us if the warnings went
away and whether everything is still working fine.

Cheers,

    Gabor

As I saw from the mailing list the MSVC 2005 patches were made to take into
account the new files from the development branch, files which are not in
the 2.3 release. So for now the below patch is the only one functional for
the release. If I am wrong, please someone correct me.

Yes, but what I want to do is merge the patches from mainline for MSVC 2005 to the release branch. The goal is that I want you to be able to build using 2008 and for everyone using 2005 to be able to build as well.

I am sorry if I gave the impression that I did not care about building LLVM with MSVC for 2.3. That is not the case at all. I should have worded my reply differently. What I was hoping for was that someone could go through the patches and verify that if applied to the release23 branch that it would build for 2005 and 2008. I do not have MSVC to be able to test it myself.

These are the patches that I think we need:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20080512/062421.html
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20080512/062599.html
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20080519/062673.html

Can someone on MSVC 2005 and someone on 2008 please checkout the release_23 branch and apply these ptaches? Let me know if thats enough to get things building for MSVC 2005 and 2008.

Thanks,
-Tanya

Ok, I got the release_23 branch and added/removed files until it would build without errors. I didn't have time to test the clang build, but at least this patch will make things compile so someone else can test it.

I just sent a reply to Razvan with 3 patches that I think should be merged into the release branch. I want to keep it somewhat in sync with mainline. Can you try applying those 3 patches and let me know if it builds for you and what version of MSVC you have?

Thanks,
Tanya

I just sent a reply to Razvan with 3 patches that I think should be merged
into the release branch. I want to keep it somewhat in sync with mainline.
Can you try applying those 3 patches and let me know if it builds for you
and what version of MSVC you have?

It doesn't build.

first problem is patch 51098 that adds lib\VMCore\Use.cpp and lib\Transforms\Utils\UnrollLoop.cpp neither of which seem to exist in the release_23 branch

another problem is patch 51237 which among other things renames lib\Transforms\Scalar\SimplifyCFG.cpp
to lib\Transforms\Scalar\SimplifyCFGPass.cpp
however the removal of lib\Transforms\Ipo\SimplifyLibCalls.cpp is necessary, so it won't build without this patch either.

I didn't have to apply patch 51323 to get things to build -- but the patch seems correct and it builds OK with it applied

FYI I'm using Visual Studio 2005 Professional Edition (not Express).

m.

PS. The proposed fix (by heisenbug) to the warnings from the operator new in User.h doesn't work at all.

Ok, thanks. So it seems like we have to deviate from mainline a bit. I can apply the patch that you proposed in your earlier mail. Sound ok?

I just need someone to verify that it works with 2008 so that everyone is happy.

-Tanya

[snip]

FYI I'm using Visual Studio 2005 Professional Edition (not Express).

m.

PS. The proposed fix (by heisenbug) to the warnings from the operator new in User.h doesn't work at all.

Hmmm, this is really unfortunate. http://www.glenmccl.com/tip_025.htm
confirms the given recipe.
By "doesn't work at all" you mean that the warnings still appear, or
do you get errors?

Thanks for helping to get this problem resolved, Morten!

Cheers,

    Gabor

Errrrr, please make that

  void operator delete(void*, size_t) {}

The mainline changed it in the meantime (size_t --> unsigned).

Sorry for the confusion :-/

Cheers,

    Gabor

heisenbug wrote:

Errrrr, please make that

  void operator delete(void*, size_t) {}

Yes, that gets rid of the warnings but it has to be public for reasons I don't fully understand (this whole placement new trick seems pretty ugly to me). I think it's nice to add an:

assert(0 && "Should never be reached, no exceptions should be thrown during placement new");

instead of having an empty body -- can someone add this to User.h and commit?

m.

Tanya M. Lattner wrote:

Ok, thanks. So it seems like we have to deviate from mainline a bit. I can apply the patch that you proposed in your earlier mail. Sound ok?

Sounds good to me -- I reviewed the patch a bit, and a lot of it is just noise because Visual Studio decided to reorder the definition of the debug and release configurations. I attached a minimal patch to this mail.

I just need someone to verify that it works with 2008 so that everyone is happy.

It can't get more broken than it is now, as it doesn't build at all with either 2005 or 2008...

m.

release_23_vs2005.patch (1.59 KB)