Despite the commit of... ------------------------------------------------------------------------ r135371 | lattner | 2011-07-18 00:25:32 -0400 (Mon, 18 Jul 2011) | 2 lines untested patch to de-constify llvm::Type, patch by David Blaikie! current dragonegg svn at r135391 still fails to compile against FSF gcc 4.5.3 with the failure... In file included from /sw/src/fink.build/dragonegg-gcc45-3.0-1/dragonegg-3.0/src/Convert.cpp:60: In file included from /sw/lib/gcc4.5/lib/gcc/x86_64-apple-darwin11.0.0/4.5.3/plugin/include/tree-flow.h:29: /sw/lib/gcc4.5/lib/gcc/x86_64-apple-darwin11.0.0/4.5.3/plugin/include/gimple.h:4376:24: warning: implicit truncation from 'int' to bitfield changes value from -32769 to 32767 [-Wconstant-conversion] gs->gsbase.subcode &= ~GF_PREDICT_TAKEN; ^ ~~~~~~~~~~~~~~~~~ /sw/src/fink.build/dragonegg-gcc45-3.0-1/dragonegg-3.0/src/Convert.cpp:429:64: error: too many arguments to function call, expected 3, have 4 ArgTypes, 3), Ops); ^ /sw/opt/llvm-3.0/include/llvm/Intrinsics.h:71:3: note: 'getDeclaration' declared here Function *getDeclaration(Module *M, ID id, ^ /sw/src/fink.build/dragonegg-gcc45-3.0-1/dragonegg-3.0/src/Convert.cpp:1674:58: error: too many arguments to function call, expected 3, have 4 ArgTypes, 3), Ops); ^ /sw/opt/llvm-3.0/include/llvm/Intrinsics.h:71:3: note: 'getDeclaration' declared here Function *getDeclaration(Module *M, ID id, ^ /sw/src/fink.build/dragonegg-gcc45-3.0-1/dragonegg-3.0/src/Convert.cpp:1692:58: error: too many arguments to function call, expected 3, have 4 ArgTypes, 3), Ops); ^ /sw/opt/llvm-3.0/include/llvm/Intrinsics.h:71:3: note: 'getDeclaration' declared here Function *getDeclaration(Module *M, ID id, ^ /sw/src/fink.build/dragonegg-gcc45-3.0-1/dragonegg-3.0/src/Convert.cpp:1710:58: error: too many arguments to function call, expected 3, have 4 ArgTypes, 2), Ops); ^ /sw/opt/llvm-3.0/include/llvm/Intrinsics.h:71:3: note: 'getDeclaration' declared here Function *getDeclaration(Module *M, ID id, ^ and In file included from /sw/src/fink.build/dragonegg-gcc45-3.0-1/dragonegg-3.0/src/Convert.cpp:50: /sw/lib/gcc4.5/lib/gcc/x86_64-apple-darwin11.0.0/4.5.3/plugin/include/tree.h:1554:31: note: instantiated from: #define TREE_OPERAND(NODE, I) TREE_OPERAND_CHECK (NODE, I) ^ /sw/lib/gcc4.5/lib/gcc/x86_64-apple-darwin11.0.0/4.5.3/plugin/include/tree.h:927:36: note: instantiated from: #define TREE_OPERAND_CHECK(T, I) ((T)->exp.operands[I]) ^ /sw/lib/gcc4.5/lib/gcc/x86_64-apple-darwin11.0.0/4.5.3/plugin/include/tree.h:1833:3: note: array 'operands' declared here tree GTY ((special ("tree_exp"), ^ /sw/src/fink.build/dragonegg-gcc45-3.0-1/dragonegg-3.0/src/Convert.cpp:3743:54: error: too many arguments to function call, expected 3, have 4 Ty, 2), ^ /sw/opt/llvm-3.0/include/llvm/Intrinsics.h:71:3: note: 'getDeclaration' declared here Function *getDeclaration(Module *M, ID id, ^ /sw/src/fink.build/dragonegg-gcc45-3.0-1/dragonegg-3.0/src/Convert.cpp:3790:54: error: too many arguments to function call, expected 3, have 4 Ty, 2), Ops); ^ /sw/opt/llvm-3.0/include/llvm/Intrinsics.h:71:3: note: 'getDeclaration' declared here Function *getDeclaration(Module *M, ID id, ^ /sw/src/fink.build/dragonegg-gcc45-3.0-1/dragonegg-3.0/src/Convert.cpp:3953:59: error: too many arguments to function call, expected 3, have 4 1), ^ /sw/opt/llvm-3.0/include/llvm/Intrinsics.h:71:3: note: 'getDeclaration' declared here Function *getDeclaration(Module *M, ID id, ^ /sw/src/fink.build/dragonegg-gcc45-3.0-1/dragonegg-3.0/src/Convert.cpp:4352:56: error: too many arguments to function call, expected 3, have 4 Ty, 2), ^ /sw/opt/llvm-3.0/include/llvm/Intrinsics.h:71:3: note: 'getDeclaration' declared here Function *getDeclaration(Module *M, ID id, ^ /sw/src/fink.build/dragonegg-gcc45-3.0-1/dragonegg-3.0/src/Convert.cpp:4400:56: error: too many arguments to function call, expected 3, have 4 Ty, 2), ^ /sw/opt/llvm-3.0/include/llvm/Intrinsics.h:71:3: note: 'getDeclaration' declared here Function *getDeclaration(Module *M, ID id, ^ /sw/src/fink.build/dragonegg-gcc45-3.0-1/dragonegg-3.0/src/Convert.cpp:4448:56: error: too many arguments to function call, expected 3, have 4 Ty, 2), ^ /sw/opt/llvm-3.0/include/llvm/Intrinsics.h:71:3: note: 'getDeclaration' declared here Function *getDeclaration(Module *M, ID id, ^ /sw/src/fink.build/dragonegg-gcc45-3.0-1/dragonegg-3.0/src/Convert.cpp:4496:56: error: too many arguments to function call, expected 3, have 4 Ty, 2), ^ /sw/opt/llvm-3.0/include/llvm/Intrinsics.h:71:3: note: 'getDeclaration' declared here Function *getDeclaration(Module *M, ID id, ^ /sw/src/fink.build/dragonegg-gcc45-3.0-1/dragonegg-3.0/src/Convert.cpp:4544:56: error: too many arguments to function call, expected 3, have 4 Ty, 2), ^ /sw/opt/llvm-3.0/include/llvm/Intrinsics.h:71:3: note: 'getDeclaration' declared here Function *getDeclaration(Module *M, ID id, ^ /sw/src/fink.build/dragonegg-gcc45-3.0-1/dragonegg-3.0/src/Convert.cpp:4592:56: error: too many arguments to function call, expected 3, have 4 Ty, 2), ^ /sw/opt/llvm-3.0/include/llvm/Intrinsics.h:71:3: note: 'getDeclaration' declared here Function *getDeclaration(Module *M, ID id, ^ /sw/src/fink.build/dragonegg-gcc45-3.0-1/dragonegg-3.0/src/Convert.cpp:4697:77: error: too many arguments to function call, expected 3, have 4 Result = Builder.CreateCall(Intrinsic::getDeclaration(TheModule, Id, &Ty, 1), ~~~~~~~~~~~~~~~~~~~~~~~~~ ^ /sw/opt/llvm-3.0/include/llvm/Intrinsics.h:71:3: note: 'getDeclaration' declared here Function *getDeclaration(Module *M, ID id, ^ /sw/src/fink.build/dragonegg-gcc45-3.0-1/dragonegg-3.0/src/Convert.cpp:4707:77: error: too many arguments to function call, expected 3, have 4 Intrinsic::sqrt, &Ty, 1), ^ /sw/opt/llvm-3.0/include/llvm/Intrinsics.h:71:3: note: 'getDeclaration' declared here Function *getDeclaration(Module *M, ID id, ^ /sw/src/fink.build/dragonegg-gcc45-3.0-1/dragonegg-3.0/src/Convert.cpp:4724:77: error: too many arguments to function call, expected 3, have 4 Intrinsic::powi, &Ty, 1), ^ /sw/opt/llvm-3.0/include/llvm/Intrinsics.h:71:3: note: 'getDeclaration' declared here Function *getDeclaration(Module *M, ID id, ^ /sw/src/fink.build/dragonegg-gcc45-3.0-1/dragonegg-3.0/src/Convert.cpp:4740:76: error: too many arguments to function call, expected 3, have 4 Intrinsic::pow, &Ty, 1), ^ /sw/opt/llvm-3.0/include/llvm/Intrinsics.h:71:3: note: 'getDeclaration' declared here Function *getDeclaration(Module *M, ID id, ^ /sw/src/fink.build/dragonegg-gcc45-3.0-1/dragonegg-3.0/src/Convert.cpp:5556:50: error: too many arguments to function call, expected 3, have 4 &SBP, 1); ^ /sw/opt/llvm-3.0/include/llvm/Intrinsics.h:71:3: note: 'getDeclaration' declared here Function *getDeclaration(Module *M, ID id, ^
Looks like that break came from http://llvm.org/viewvc/llvm-project?view=rev&revision=135154 Judging by this<http://llvm.org/docs/doxygen/html/classllvm_1_1ArrayRef.html#a3b1f44186f9787d7ffacb54b62d6798c> ArrayRef ctor you should be able to simplify those calls by changing the last two arguments from "&foo, 1" to, simply, "foo". On Mon, Jul 18, 2011 at 6:59 AM, Jack Howarth <howarth at bromo.med.uc.edu>wrote:> Despite the commit of... > > ------------------------------------------------------------------------ > r135371 | lattner | 2011-07-18 00:25:32 -0400 (Mon, 18 Jul 2011) | 2 lines > > untested patch to de-constify llvm::Type, patch by David Blaikie! > > current dragonegg svn at r135391 still fails to compile against FSF gcc > 4.5.3 > with the failure... > > In file included from > /sw/src/fink.build/dragonegg-gcc45-3.0-1/dragonegg-3.0/src/Convert.cpp:60: > In file included from > /sw/lib/gcc4.5/lib/gcc/x86_64-apple-darwin11.0.0/4.5.3/plugin/include/tree-flow.h:29: > /sw/lib/gcc4.5/lib/gcc/x86_64-apple-darwin11.0.0/4.5.3/plugin/include/gimple.h:4376:24: > warning: implicit truncation from 'int' to bitfield changes value from > -32769 to > 32767 [-Wconstant-conversion] > gs->gsbase.subcode &= ~GF_PREDICT_TAKEN; > ^ ~~~~~~~~~~~~~~~~~ > /sw/src/fink.build/dragonegg-gcc45-3.0-1/dragonegg-3.0/src/Convert.cpp:429:64: > error: too many arguments to function call, expected 3, have 4 > ArgTypes, 3), Ops); > ^ > /sw/opt/llvm-3.0/include/llvm/Intrinsics.h:71:3: note: 'getDeclaration' > declared here > Function *getDeclaration(Module *M, ID id, > ^ > /sw/src/fink.build/dragonegg-gcc45-3.0-1/dragonegg-3.0/src/Convert.cpp:1674:58: > error: too many arguments to function call, expected 3, have 4 > ArgTypes, 3), Ops); > ^ > /sw/opt/llvm-3.0/include/llvm/Intrinsics.h:71:3: note: 'getDeclaration' > declared here > Function *getDeclaration(Module *M, ID id, > ^ > /sw/src/fink.build/dragonegg-gcc45-3.0-1/dragonegg-3.0/src/Convert.cpp:1692:58: > error: too many arguments to function call, expected 3, have 4 > ArgTypes, 3), Ops); > ^ > /sw/opt/llvm-3.0/include/llvm/Intrinsics.h:71:3: note: 'getDeclaration' > declared here > Function *getDeclaration(Module *M, ID id, > ^ > /sw/src/fink.build/dragonegg-gcc45-3.0-1/dragonegg-3.0/src/Convert.cpp:1710:58: > error: too many arguments to function call, expected 3, have 4 > ArgTypes, 2), Ops); > ^ > /sw/opt/llvm-3.0/include/llvm/Intrinsics.h:71:3: note: 'getDeclaration' > declared here > Function *getDeclaration(Module *M, ID id, > ^ > > and > > In file included from > /sw/src/fink.build/dragonegg-gcc45-3.0-1/dragonegg-3.0/src/Convert.cpp:50: > /sw/lib/gcc4.5/lib/gcc/x86_64-apple-darwin11.0.0/4.5.3/plugin/include/tree.h:1554:31: > note: instantiated from: > #define TREE_OPERAND(NODE, I) TREE_OPERAND_CHECK (NODE, I) > ^ > /sw/lib/gcc4.5/lib/gcc/x86_64-apple-darwin11.0.0/4.5.3/plugin/include/tree.h:927:36: > note: instantiated from: > #define TREE_OPERAND_CHECK(T, I) ((T)->exp.operands[I]) > ^ > /sw/lib/gcc4.5/lib/gcc/x86_64-apple-darwin11.0.0/4.5.3/plugin/include/tree.h:1833:3: > note: array 'operands' declared here > tree GTY ((special ("tree_exp"), > ^ > /sw/src/fink.build/dragonegg-gcc45-3.0-1/dragonegg-3.0/src/Convert.cpp:3743:54: > error: too many arguments to function call, expected 3, have 4 > Ty, 2), > ^ > /sw/opt/llvm-3.0/include/llvm/Intrinsics.h:71:3: note: 'getDeclaration' > declared here > Function *getDeclaration(Module *M, ID id, > ^ > /sw/src/fink.build/dragonegg-gcc45-3.0-1/dragonegg-3.0/src/Convert.cpp:3790:54: > error: too many arguments to function call, expected 3, have 4 > Ty, 2), Ops); > ^ > /sw/opt/llvm-3.0/include/llvm/Intrinsics.h:71:3: note: 'getDeclaration' > declared here > Function *getDeclaration(Module *M, ID id, > ^ > /sw/src/fink.build/dragonegg-gcc45-3.0-1/dragonegg-3.0/src/Convert.cpp:3953:59: > error: too many arguments to function call, expected 3, have 4 > 1), > ^ > /sw/opt/llvm-3.0/include/llvm/Intrinsics.h:71:3: note: 'getDeclaration' > declared here > Function *getDeclaration(Module *M, ID id, > ^ > /sw/src/fink.build/dragonegg-gcc45-3.0-1/dragonegg-3.0/src/Convert.cpp:4352:56: > error: too many arguments to function call, expected 3, have 4 > Ty, 2), > ^ > /sw/opt/llvm-3.0/include/llvm/Intrinsics.h:71:3: note: 'getDeclaration' > declared here > Function *getDeclaration(Module *M, ID id, > ^ > /sw/src/fink.build/dragonegg-gcc45-3.0-1/dragonegg-3.0/src/Convert.cpp:4400:56: > error: too many arguments to function call, expected 3, have 4 > Ty, 2), > ^ > /sw/opt/llvm-3.0/include/llvm/Intrinsics.h:71:3: note: 'getDeclaration' > declared here > Function *getDeclaration(Module *M, ID id, > ^ > /sw/src/fink.build/dragonegg-gcc45-3.0-1/dragonegg-3.0/src/Convert.cpp:4448:56: > error: too many arguments to function call, expected 3, have 4 > Ty, 2), > ^ > /sw/opt/llvm-3.0/include/llvm/Intrinsics.h:71:3: note: 'getDeclaration' > declared here > Function *getDeclaration(Module *M, ID id, > ^ > /sw/src/fink.build/dragonegg-gcc45-3.0-1/dragonegg-3.0/src/Convert.cpp:4496:56: > error: too many arguments to function call, expected 3, have 4 > Ty, 2), > ^ > /sw/opt/llvm-3.0/include/llvm/Intrinsics.h:71:3: note: 'getDeclaration' > declared here > Function *getDeclaration(Module *M, ID id, > ^ > /sw/src/fink.build/dragonegg-gcc45-3.0-1/dragonegg-3.0/src/Convert.cpp:4544:56: > error: too many arguments to function call, expected 3, have 4 > Ty, 2), > ^ > /sw/opt/llvm-3.0/include/llvm/Intrinsics.h:71:3: note: 'getDeclaration' > declared here > Function *getDeclaration(Module *M, ID id, > ^ > /sw/src/fink.build/dragonegg-gcc45-3.0-1/dragonegg-3.0/src/Convert.cpp:4592:56: > error: too many arguments to function call, expected 3, have 4 > Ty, 2), > ^ > /sw/opt/llvm-3.0/include/llvm/Intrinsics.h:71:3: note: 'getDeclaration' > declared here > Function *getDeclaration(Module *M, ID id, > ^ > /sw/src/fink.build/dragonegg-gcc45-3.0-1/dragonegg-3.0/src/Convert.cpp:4697:77: > error: too many arguments to function call, expected 3, have 4 > Result = Builder.CreateCall(Intrinsic::getDeclaration(TheModule, Id, &Ty, > 1), > ~~~~~~~~~~~~~~~~~~~~~~~~~ > ^ > /sw/opt/llvm-3.0/include/llvm/Intrinsics.h:71:3: note: 'getDeclaration' > declared here > Function *getDeclaration(Module *M, ID id, > ^ > /sw/src/fink.build/dragonegg-gcc45-3.0-1/dragonegg-3.0/src/Convert.cpp:4707:77: > error: too many arguments to function call, expected 3, have 4 > Intrinsic::sqrt, &Ty, > 1), > > ^ > /sw/opt/llvm-3.0/include/llvm/Intrinsics.h:71:3: note: 'getDeclaration' > declared here > Function *getDeclaration(Module *M, ID id, > ^ > /sw/src/fink.build/dragonegg-gcc45-3.0-1/dragonegg-3.0/src/Convert.cpp:4724:77: > error: too many arguments to function call, expected 3, have 4 > Intrinsic::powi, &Ty, > 1), > > ^ > /sw/opt/llvm-3.0/include/llvm/Intrinsics.h:71:3: note: 'getDeclaration' > declared here > Function *getDeclaration(Module *M, ID id, > ^ > /sw/src/fink.build/dragonegg-gcc45-3.0-1/dragonegg-3.0/src/Convert.cpp:4740:76: > error: too many arguments to function call, expected 3, have 4 > Intrinsic::pow, &Ty, > 1), > ^ > /sw/opt/llvm-3.0/include/llvm/Intrinsics.h:71:3: note: 'getDeclaration' > declared here > Function *getDeclaration(Module *M, ID id, > ^ > /sw/src/fink.build/dragonegg-gcc45-3.0-1/dragonegg-3.0/src/Convert.cpp:5556:50: > error: too many arguments to function call, expected 3, have 4 > &SBP, 1); > ^ > /sw/opt/llvm-3.0/include/llvm/Intrinsics.h:71:3: note: 'getDeclaration' > declared here > Function *getDeclaration(Module *M, ID id, > ^ > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110718/3f112986/attachment.html>
On 18/07/11 15:59, Jack Howarth wrote:> Despite the commit of...Chris made major changes to the LLVM type system, which requires major changes to dragonegg (c.f. the patch Chris applied to llvm-gcc). I'm on holiday which is why I haven't taken care of it yet. Ciao, Duncan.
On 07/18/2011 10:32 PM, Duncan Sands wrote:> On 18/07/11 15:59, Jack Howarth wrote: >> Despite the commit of... > > Chris made major changes to the LLVM type system, which requires major changes > to dragonegg (c.f. the patch Chris applied to llvm-gcc). I'm on holiday which > is why I haven't taken care of it yet.I looked into this. The posted errors in Convert.cpp can be easily fixed as mentioned. However, compiling the Types.cpp file (the type stuff in dragonegg), yields to more complex errors, that are introduced e.g. by the removal of the Opaque type. So unfortunately it seems, we need to wait until someone spends a couple of hours/days on this. @Duncan: Enjoy your vacations, such that you are full of energy to fix these bugs when you are back. ;-) Cheers Tobi
On Jul 18, 2011, at 1:32 PM, Duncan Sands wrote:> On 18/07/11 15:59, Jack Howarth wrote: >> Despite the commit of... > > Chris made major changes to the LLVM type system, which requires major changes > to dragonegg (c.f. the patch Chris applied to llvm-gcc). I'm on holiday which > is why I haven't taken care of it yet.Yeah, sorry about that Duncan. I can't directly hack on the code, but I'm happy to answer questions when you get back. -Chris
On 18 July 2011 15:23, David Blaikie <dblaikie at gmail.com> wrote:> Looks like that break came > from http://llvm.org/viewvc/llvm-project?view=rev&revision=135154 > Judging by this ArrayRef ctor you should be able to simplify those calls by > changing the last two arguments from "&foo, 1" to, simply, "foo".I've done this in r135472. Jay.