Re: [llvm-commits] [llvm-gcc] Changes In Boolean (please commit)
Applied to tree. Cheers, -- Jim On 11-Jan-07, at 2:24 PM, Reid Spencer wrote: All, Please apply this patch to llvm-gcc r247. It adjusts llvm-gcc for recent changes in LLVM related to the BoolTy. BoolTy-Int1Ty ConstantBool-ConstantInt ConstantIntegral-ConstantInt ReidBoolChanges.patch___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
Re: [llvm-commits] [llvm-gcc] Changes In Boolean (please commit)
The patch doesn't work: g++40 -c -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -pedantic -Wno-long-long -Wno-variadic-macros -fno-common -DHAVE_CONFIG_H -Wno-unused -DTARGET_NAME=\amd64-unknown-freebsd6.1\ -DENABLE_LLVM -D__STDC_LIMIT_MACROS -I. -I. -I../../gcc -I../../gcc/. -I../../gcc/../include -I../../gcc/../libcpp/include -I/usr/home/jeffc/llvm/include -I/home/jeffc/llvm/obj/include ../../gcc/llvm-debug.cpp -o llvm-debug.o ../../gcc/llvm-types.cpp: In member function 'const llvm::Type* TypeConverter::ConvertType(tree_node*)': ../../gcc/llvm-types.cpp:291: error: 'Int1Ty' is not a member of 'llvm::Type' ../../gcc/llvm-types.cpp: In member function 'voidunnamed::FunctionTypeConversion::HandleScalarArgument(const llvm::Type*, tree_node*)': ../../gcc/llvm-types.cpp:520: error: 'Int1Ty' is not a member of 'llvm::Type' gmake[1]: *** [llvm-types.o] Error 1 gmake[1]: *** Waiting for unfinished jobs ../../gcc/llvm-convert.cpp: In member function 'llvm::Value* TreeToLLVM::CastToType(unsigned int, llvm::Value*, const llvm::Type*)': ../../gcc/llvm-convert.cpp:716: error: 'Int1Ty' is not a member of 'llvm::Type' ../../gcc/llvm-convert.cpp:716: error: 'Int1Ty' is not a member of 'llvm::Type' ../../gcc/llvm-convert.cpp: In member function 'llvm::Value* TreeToLLVM::EmitCOND_EXPR(tree_node*)': ../../gcc/llvm-convert.cpp:1390: error: 'Int1Ty' is not a member of 'llvm::Type' ../../gcc/llvm-convert.cpp: In member function 'llvm::Value* TreeToLLVM::EmitTRUTH_NOT_EXPR(tree_node*)': ../../gcc/llvm-convert.cpp:2379: error: 'Int1Ty' is not a member of 'llvm::Type' ../../gcc/llvm-convert.cpp: In member function 'LValue TreeToLLVM::EmitLV_COMPONENT_REF(tree_node*)': ../../gcc/llvm-convert.cpp:4041: error: 'Int1Ty' is not a member of 'llvm::Type' Reid Spencer wrote: All, Please apply this patch to llvm-gcc r247. It adjusts llvm-gcc for recent changes in LLVM related to the BoolTy. BoolTy-Int1Ty ConstantBool-ConstantInt ConstantIntegral-ConstantInt Reid Index: gcc/llvm-backend.cpp === --- gcc/llvm-backend.cpp(revision 247) +++ gcc/llvm-backend.cpp(working copy) @@ -569,7 +569,7 @@ // If this has already been processed, don't emit duplicate error messages. if (DECL_LLVM_SET_P(decl)) { // Error state encoded into DECL_LLVM. -return castConstantBool(DECL_LLVM(decl))-getValue(); +return castConstantInt(DECL_LLVM(decl))-getBoolValue(); } /* Detect errors in declaring global registers. */ @@ -593,10 +593,10 @@ if (TREE_THIS_VOLATILE(decl)) warning(volatile register variables don%'t work as you might wish); -SET_DECL_LLVM(decl, ConstantBool::getFalse()); +SET_DECL_LLVM(decl, ConstantInt::getFalse()); return false; // Everything ok. } - SET_DECL_LLVM(decl, ConstantBool::getTrue()); + SET_DECL_LLVM(decl, ConstantInt::getTrue()); return true; } Index: gcc/llvm-convert.cpp === --- gcc/llvm-convert.cpp(revision 247) +++ gcc/llvm-convert.cpp(working copy) @@ -713,7 +713,7 @@ // Handle cast (cast bool X to T2) to bool as X, because this occurs all over // the place. if (CastInst *CI = dyn_castCastInst(V)) -if (Ty == Type::BoolTy CI-getOperand(0)-getType() == Type::BoolTy) +if (Ty == Type::Int1Ty CI-getOperand(0)-getType() == Type::Int1Ty) return CI-getOperand(0); return CastInst::create(Instruction::CastOps(opcode), V, Ty, V-getName(), CurBB); @@ -1384,10 +1384,10 @@ } Value *TreeToLLVM::EmitCOND_EXPR(tree exp) { - // Emit the conditional expression and trunc/bitcast to BoolTy + // Emit the conditional expression and trunc/bitcast to Int1Ty Value *Cond = Emit(COND_EXPR_COND(exp), 0); // If its not already a bool, insert a comparison against zero to make it so. - if (Cond-getType() != Type::BoolTy) + if (Cond-getType() != Type::Int1Ty) Cond = new ICmpInst(ICmpInst::ICMP_NE, Cond, Constant::getNullValue(Cond-getType()), toBool, CurBB); @@ -2376,7 +2376,7 @@ Value *TreeToLLVM::EmitTRUTH_NOT_EXPR(tree exp) { Value *V = Emit(TREE_OPERAND(exp, 0), 0); - if (V-getType() != Type::BoolTy) + if (V-getType() != Type::Int1Ty) V = new ICmpInst(ICmpInst::ICMP_NE, V, Constant::getNullValue(V-getType()), toBool, CurBB); V = BinaryOperator::createNot(V, V-getName()+not, CurBB); @@ -4038,7 +4038,7 @@ // If the field result is a bool, cast to a ubyte instead. It is not // possible to access all bits of a memory object with a bool (only the low // bit) but it is possible to access them with a byte. -if (FieldTy == Type::BoolTy) +if (FieldTy == Type::Int1Ty) FieldTy = Type::Int8Ty; assert(FieldTy-isInteger()
Re: [llvm-commits] [llvm-gcc] Changes In Boolean (please commit)
OK, so I figured I need to update LLVM. Now that doesn't build: llvm[2]: Compiling Lexer.cpp for Debug build Lexer.cpp: In function 'int llvmAsmlex()': Lexer.cpp:1244: error: label 'find_rule' used but not defined gmake[2]: *** [/usr/home/jeffc/llvm/obj/lib/AsmParser/Debug/Lexer.o] Error 1 I think I'll just go away for a few weeks and wait for the dust to settle Jeff Cohen wrote: The patch doesn't work: g++40 -c -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -pedantic -Wno-long-long -Wno-variadic-macros -fno-common -DHAVE_CONFIG_H -Wno-unused -DTARGET_NAME=\amd64-unknown-freebsd6.1\ -DENABLE_LLVM -D__STDC_LIMIT_MACROS -I. -I. -I../../gcc -I../../gcc/. -I../../gcc/../include -I../../gcc/../libcpp/include -I/usr/home/jeffc/llvm/include -I/home/jeffc/llvm/obj/include ../../gcc/llvm-debug.cpp -o llvm-debug.o ../../gcc/llvm-types.cpp: In member function 'const llvm::Type* TypeConverter::ConvertType(tree_node*)': ../../gcc/llvm-types.cpp:291: error: 'Int1Ty' is not a member of 'llvm::Type' ../../gcc/llvm-types.cpp: In member function 'voidunnamed::FunctionTypeConversion::HandleScalarArgument(const llvm::Type*, tree_node*)': ../../gcc/llvm-types.cpp:520: error: 'Int1Ty' is not a member of 'llvm::Type' gmake[1]: *** [llvm-types.o] Error 1 gmake[1]: *** Waiting for unfinished jobs ../../gcc/llvm-convert.cpp: In member function 'llvm::Value* TreeToLLVM::CastToType(unsigned int, llvm::Value*, const llvm::Type*)': ../../gcc/llvm-convert.cpp:716: error: 'Int1Ty' is not a member of 'llvm::Type' ../../gcc/llvm-convert.cpp:716: error: 'Int1Ty' is not a member of 'llvm::Type' ../../gcc/llvm-convert.cpp: In member function 'llvm::Value* TreeToLLVM::EmitCOND_EXPR(tree_node*)': ../../gcc/llvm-convert.cpp:1390: error: 'Int1Ty' is not a member of 'llvm::Type' ../../gcc/llvm-convert.cpp: In member function 'llvm::Value* TreeToLLVM::EmitTRUTH_NOT_EXPR(tree_node*)': ../../gcc/llvm-convert.cpp:2379: error: 'Int1Ty' is not a member of 'llvm::Type' ../../gcc/llvm-convert.cpp: In member function 'LValue TreeToLLVM::EmitLV_COMPONENT_REF(tree_node*)': ../../gcc/llvm-convert.cpp:4041: error: 'Int1Ty' is not a member of 'llvm::Type' Reid Spencer wrote: All, Please apply this patch to llvm-gcc r247. It adjusts llvm-gcc for recent changes in LLVM related to the BoolTy. BoolTy-Int1Ty ConstantBool-ConstantInt ConstantIntegral-ConstantInt Reid Index: gcc/llvm-backend.cpp === --- gcc/llvm-backend.cpp (revision 247) +++ gcc/llvm-backend.cpp (working copy) @@ -569,7 +569,7 @@ // If this has already been processed, don't emit duplicate error messages. if (DECL_LLVM_SET_P(decl)) { // Error state encoded into DECL_LLVM. -return castConstantBool(DECL_LLVM(decl))-getValue(); +return castConstantInt(DECL_LLVM(decl))-getBoolValue(); } /* Detect errors in declaring global registers. */ @@ -593,10 +593,10 @@ if (TREE_THIS_VOLATILE(decl)) warning(volatile register variables don%'t work as you might wish); -SET_DECL_LLVM(decl, ConstantBool::getFalse()); +SET_DECL_LLVM(decl, ConstantInt::getFalse()); return false; // Everything ok. } - SET_DECL_LLVM(decl, ConstantBool::getTrue()); + SET_DECL_LLVM(decl, ConstantInt::getTrue()); return true; } Index: gcc/llvm-convert.cpp === --- gcc/llvm-convert.cpp (revision 247) +++ gcc/llvm-convert.cpp (working copy) @@ -713,7 +713,7 @@ // Handle cast (cast bool X to T2) to bool as X, because this occurs all over // the place. if (CastInst *CI = dyn_castCastInst(V)) -if (Ty == Type::BoolTy CI-getOperand(0)-getType() == Type::BoolTy) +if (Ty == Type::Int1Ty CI-getOperand(0)-getType() == Type::Int1Ty) return CI-getOperand(0); return CastInst::create(Instruction::CastOps(opcode), V, Ty, V-getName(), CurBB); @@ -1384,10 +1384,10 @@ } Value *TreeToLLVM::EmitCOND_EXPR(tree exp) { - // Emit the conditional expression and trunc/bitcast to BoolTy + // Emit the conditional expression and trunc/bitcast to Int1Ty Value *Cond = Emit(COND_EXPR_COND(exp), 0); // If its not already a bool, insert a comparison against zero to make it so. - if (Cond-getType() != Type::BoolTy) + if (Cond-getType() != Type::Int1Ty) Cond = new ICmpInst(ICmpInst::ICMP_NE, Cond, Constant::getNullValue(Cond-getType()), toBool, CurBB); @@ -2376,7 +2376,7 @@ Value *TreeToLLVM::EmitTRUTH_NOT_EXPR(tree exp) { Value *V = Emit(TREE_OPERAND(exp, 0), 0); - if (V-getType() != Type::BoolTy) + if (V-getType() != Type::Int1Ty) V = new ICmpInst(ICmpInst::ICMP_NE, V,
Re: [llvm-commits] [llvm-gcc] Changes In Boolean (please commit)
You need to update your LLVM tree. I just committed the BoolTy-Int1Ty change and the patch handles that change as well. Reid. On Thu, 2007-01-11 at 12:24 -0800, Jeff Cohen wrote: The patch doesn't work: g++40 -c -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -pedantic -Wno-long-long -Wno-variadic-macros -fno-common -DHAVE_CONFIG_H -Wno-unused -DTARGET_NAME=\amd64-unknown-freebsd6.1\ -DENABLE_LLVM -D__STDC_LIMIT_MACROS -I. -I. -I../../gcc -I../../gcc/. -I../../gcc/../include -I../../gcc/../libcpp/include -I/usr/home/jeffc/llvm/include -I/home/jeffc/llvm/obj/include ../../gcc/llvm-debug.cpp -o llvm-debug.o ../../gcc/llvm-types.cpp: In member function 'const llvm::Type* TypeConverter::ConvertType(tree_node*)': ../../gcc/llvm-types.cpp:291: error: 'Int1Ty' is not a member of 'llvm::Type' ../../gcc/llvm-types.cpp: In member function 'voidunnamed::FunctionTypeConversion::HandleScalarArgument(const llvm::Type*, tree_node*)': ../../gcc/llvm-types.cpp:520: error: 'Int1Ty' is not a member of 'llvm::Type' gmake[1]: *** [llvm-types.o] Error 1 gmake[1]: *** Waiting for unfinished jobs ../../gcc/llvm-convert.cpp: In member function 'llvm::Value* TreeToLLVM::CastToType(unsigned int, llvm::Value*, const llvm::Type*)': ../../gcc/llvm-convert.cpp:716: error: 'Int1Ty' is not a member of 'llvm::Type' ../../gcc/llvm-convert.cpp:716: error: 'Int1Ty' is not a member of 'llvm::Type' ../../gcc/llvm-convert.cpp: In member function 'llvm::Value* TreeToLLVM::EmitCOND_EXPR(tree_node*)': ../../gcc/llvm-convert.cpp:1390: error: 'Int1Ty' is not a member of 'llvm::Type' ../../gcc/llvm-convert.cpp: In member function 'llvm::Value* TreeToLLVM::EmitTRUTH_NOT_EXPR(tree_node*)': ../../gcc/llvm-convert.cpp:2379: error: 'Int1Ty' is not a member of 'llvm::Type' ../../gcc/llvm-convert.cpp: In member function 'LValue TreeToLLVM::EmitLV_COMPONENT_REF(tree_node*)': ../../gcc/llvm-convert.cpp:4041: error: 'Int1Ty' is not a member of 'llvm::Type' Reid Spencer wrote: All, Please apply this patch to llvm-gcc r247. It adjusts llvm-gcc for recent changes in LLVM related to the BoolTy. BoolTy-Int1Ty ConstantBool-ConstantInt ConstantIntegral-ConstantInt Reid Index: gcc/llvm-backend.cpp === --- gcc/llvm-backend.cpp(revision 247) +++ gcc/llvm-backend.cpp(working copy) @@ -569,7 +569,7 @@ // If this has already been processed, don't emit duplicate error messages. if (DECL_LLVM_SET_P(decl)) { // Error state encoded into DECL_LLVM. -return castConstantBool(DECL_LLVM(decl))-getValue(); +return castConstantInt(DECL_LLVM(decl))-getBoolValue(); } /* Detect errors in declaring global registers. */ @@ -593,10 +593,10 @@ if (TREE_THIS_VOLATILE(decl)) warning(volatile register variables don%'t work as you might wish); -SET_DECL_LLVM(decl, ConstantBool::getFalse()); +SET_DECL_LLVM(decl, ConstantInt::getFalse()); return false; // Everything ok. } - SET_DECL_LLVM(decl, ConstantBool::getTrue()); + SET_DECL_LLVM(decl, ConstantInt::getTrue()); return true; } Index: gcc/llvm-convert.cpp === --- gcc/llvm-convert.cpp(revision 247) +++ gcc/llvm-convert.cpp(working copy) @@ -713,7 +713,7 @@ // Handle cast (cast bool X to T2) to bool as X, because this occurs all over // the place. if (CastInst *CI = dyn_castCastInst(V)) -if (Ty == Type::BoolTy CI-getOperand(0)-getType() == Type::BoolTy) +if (Ty == Type::Int1Ty CI-getOperand(0)-getType() == Type::Int1Ty) return CI-getOperand(0); return CastInst::create(Instruction::CastOps(opcode), V, Ty, V-getName(), CurBB); @@ -1384,10 +1384,10 @@ } Value *TreeToLLVM::EmitCOND_EXPR(tree exp) { - // Emit the conditional expression and trunc/bitcast to BoolTy + // Emit the conditional expression and trunc/bitcast to Int1Ty Value *Cond = Emit(COND_EXPR_COND(exp), 0); // If its not already a bool, insert a comparison against zero to make it so. - if (Cond-getType() != Type::BoolTy) + if (Cond-getType() != Type::Int1Ty) Cond = new ICmpInst(ICmpInst::ICMP_NE, Cond, Constant::getNullValue(Cond-getType()), toBool, CurBB); @@ -2376,7 +2376,7 @@ Value *TreeToLLVM::EmitTRUTH_NOT_EXPR(tree exp) { Value *V = Emit(TREE_OPERAND(exp, 0), 0); - if (V-getType() != Type::BoolTy) + if (V-getType() != Type::Int1Ty) V = new ICmpInst(ICmpInst::ICMP_NE, V, Constant::getNullValue(V-getType()), toBool, CurBB); V = BinaryOperator::createNot(V, V-getName()+not, CurBB); @@ -4038,7 +4038,7 @@ // If
Re: [llvm-commits] [llvm-gcc] Changes In Boolean (please commit)
See my previous message. I updated, and LLVM no longer builds. Reid Spencer wrote: You need to update your LLVM tree. I just committed the BoolTy-Int1Ty change and the patch handles that change as well. Reid. On Thu, 2007-01-11 at 12:24 -0800, Jeff Cohen wrote: The patch doesn't work: g++40 -c -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -pedantic -Wno-long-long -Wno-variadic-macros -fno-common -DHAVE_CONFIG_H -Wno-unused -DTARGET_NAME=\amd64-unknown-freebsd6.1\ -DENABLE_LLVM -D__STDC_LIMIT_MACROS -I. -I. -I../../gcc -I../../gcc/. -I../../gcc/../include -I../../gcc/../libcpp/include -I/usr/home/jeffc/llvm/include -I/home/jeffc/llvm/obj/include ../../gcc/llvm-debug.cpp -o llvm-debug.o ../../gcc/llvm-types.cpp: In member function 'const llvm::Type* TypeConverter::ConvertType(tree_node*)': ../../gcc/llvm-types.cpp:291: error: 'Int1Ty' is not a member of 'llvm::Type' ../../gcc/llvm-types.cpp: In member function 'voidunnamed::FunctionTypeConversion::HandleScalarArgument(const llvm::Type*, tree_node*)': ../../gcc/llvm-types.cpp:520: error: 'Int1Ty' is not a member of 'llvm::Type' gmake[1]: *** [llvm-types.o] Error 1 gmake[1]: *** Waiting for unfinished jobs ../../gcc/llvm-convert.cpp: In member function 'llvm::Value* TreeToLLVM::CastToType(unsigned int, llvm::Value*, const llvm::Type*)': ../../gcc/llvm-convert.cpp:716: error: 'Int1Ty' is not a member of 'llvm::Type' ../../gcc/llvm-convert.cpp:716: error: 'Int1Ty' is not a member of 'llvm::Type' ../../gcc/llvm-convert.cpp: In member function 'llvm::Value* TreeToLLVM::EmitCOND_EXPR(tree_node*)': ../../gcc/llvm-convert.cpp:1390: error: 'Int1Ty' is not a member of 'llvm::Type' ../../gcc/llvm-convert.cpp: In member function 'llvm::Value* TreeToLLVM::EmitTRUTH_NOT_EXPR(tree_node*)': ../../gcc/llvm-convert.cpp:2379: error: 'Int1Ty' is not a member of 'llvm::Type' ../../gcc/llvm-convert.cpp: In member function 'LValue TreeToLLVM::EmitLV_COMPONENT_REF(tree_node*)': ../../gcc/llvm-convert.cpp:4041: error: 'Int1Ty' is not a member of 'llvm::Type' Reid Spencer wrote: All, Please apply this patch to llvm-gcc r247. It adjusts llvm-gcc for recent changes in LLVM related to the BoolTy. BoolTy-Int1Ty ConstantBool-ConstantInt ConstantIntegral-ConstantInt Reid Index: gcc/llvm-backend.cpp === --- gcc/llvm-backend.cpp(revision 247) +++ gcc/llvm-backend.cpp(working copy) @@ -569,7 +569,7 @@ // If this has already been processed, don't emit duplicate error messages. if (DECL_LLVM_SET_P(decl)) { // Error state encoded into DECL_LLVM. -return castConstantBool(DECL_LLVM(decl))-getValue(); +return castConstantInt(DECL_LLVM(decl))-getBoolValue(); } /* Detect errors in declaring global registers. */ @@ -593,10 +593,10 @@ if (TREE_THIS_VOLATILE(decl)) warning(volatile register variables don%'t work as you might wish); -SET_DECL_LLVM(decl, ConstantBool::getFalse()); +SET_DECL_LLVM(decl, ConstantInt::getFalse()); return false; // Everything ok. } - SET_DECL_LLVM(decl, ConstantBool::getTrue()); + SET_DECL_LLVM(decl, ConstantInt::getTrue()); return true; } Index: gcc/llvm-convert.cpp === --- gcc/llvm-convert.cpp(revision 247) +++ gcc/llvm-convert.cpp(working copy) @@ -713,7 +713,7 @@ // Handle cast (cast bool X to T2) to bool as X, because this occurs all over // the place. if (CastInst *CI = dyn_castCastInst(V)) -if (Ty == Type::BoolTy CI-getOperand(0)-getType() == Type::BoolTy) +if (Ty == Type::Int1Ty CI-getOperand(0)-getType() == Type::Int1Ty) return CI-getOperand(0); return CastInst::create(Instruction::CastOps(opcode), V, Ty, V-getName(), CurBB); @@ -1384,10 +1384,10 @@ } Value *TreeToLLVM::EmitCOND_EXPR(tree exp) { - // Emit the conditional expression and trunc/bitcast to BoolTy + // Emit the conditional expression and trunc/bitcast to Int1Ty Value *Cond = Emit(COND_EXPR_COND(exp), 0); // If its not already a bool, insert a comparison against zero to make it so. - if (Cond-getType() != Type::BoolTy) + if (Cond-getType() != Type::Int1Ty) Cond = new ICmpInst(ICmpInst::ICMP_NE, Cond, Constant::getNullValue(Cond-getType()), toBool, CurBB); @@ -2376,7 +2376,7 @@ Value *TreeToLLVM::EmitTRUTH_NOT_EXPR(tree exp) { Value *V = Emit(TREE_OPERAND(exp, 0), 0); - if (V-getType() != Type::BoolTy) + if (V-getType() != Type::Int1Ty) V = new ICmpInst(ICmpInst::ICMP_NE, V, Constant::getNullValue(V-getType()), toBool, CurBB); V = BinaryOperator::createNot(V, V-getName()+not, CurBB); @@ -4038,7 +4038,7 @@
Re: [llvm-commits] [llvm-gcc] Changes In Boolean (please commit)
Jeff, That just can't be .. see below On Thu, 2007-01-11 at 12:57 -0800, Jeff Cohen wrote: See my previous message. I updated, and LLVM no longer builds. Reid Spencer wrote: You need to update your LLVM tree. I just committed the BoolTy-Int1Ty change and the patch handles that change as well. Reid. On Thu, 2007-01-11 at 12:24 -0800, Jeff Cohen wrote: The patch doesn't work: g++40 -c -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -pedantic -Wno-long-long -Wno-variadic-macros -fno-common -DHAVE_CONFIG_H -Wno-unused -DTARGET_NAME=\amd64-unknown-freebsd6.1\ -DENABLE_LLVM -D__STDC_LIMIT_MACROS -I. -I. -I../../gcc -I../../gcc/. -I../../gcc/../include -I../../gcc/../libcpp/include -I/usr/home/jeffc/llvm/include -I/home/jeffc/llvm/obj/include ../../gcc/llvm-debug.cpp -o llvm-debug.o ../../gcc/llvm-types.cpp: In member function 'const llvm::Type* TypeConverter::ConvertType(tree_node*)': ../../gcc/llvm-types.cpp:291: error: 'Int1Ty' is not a member of 'llvm::Type' Int1Ty is now a member of the Type class. I double checked to make sure I committed everything. If you're getting this error then you've still got a Type.h file that is defining BoolTy instead of Int1Ty. For whatever reason, you're not at TOT for LLVM! ../../gcc/llvm-types.cpp: In member function 'voidunnamed::FunctionTypeConversion::HandleScalarArgument(const llvm::Type*, tree_node*)': ../../gcc/llvm-types.cpp:520: error: 'Int1Ty' is not a member of 'llvm::Type' Same. gmake[1]: *** [llvm-types.o] Error 1 gmake[1]: *** Waiting for unfinished jobs ../../gcc/llvm-convert.cpp: In member function 'llvm::Value* TreeToLLVM::CastToType(unsigned int, llvm::Value*, const llvm::Type*)': ../../gcc/llvm-convert.cpp:716: error: 'Int1Ty' is not a member of 'llvm::Type' Same. ../../gcc/llvm-convert.cpp:716: error: 'Int1Ty' is not a member of 'llvm::Type' Same. ../../gcc/llvm-convert.cpp: In member function 'llvm::Value* TreeToLLVM::EmitCOND_EXPR(tree_node*)': ../../gcc/llvm-convert.cpp:1390: error: 'Int1Ty' is not a member of 'llvm::Type' Same. ../../gcc/llvm-convert.cpp: In member function 'llvm::Value* TreeToLLVM::EmitTRUTH_NOT_EXPR(tree_node*)': ../../gcc/llvm-convert.cpp:2379: error: 'Int1Ty' is not a member of 'llvm::Type' Same. ../../gcc/llvm-convert.cpp: In member function 'LValue TreeToLLVM::EmitLV_COMPONENT_REF(tree_node*)': ../../gcc/llvm-convert.cpp:4041: error: 'Int1Ty' is not a member of 'llvm::Type' Same. If these are all the errors you're getting, then its very clear you are not at HEAD revision for LLVM. Check your revision number for include/llvm/Type.h. It should be revision 1.98: cvs status include/llvm/Type.h === File: Type.hStatus: Up-to-date Working revision:1.98 Repository revision: 1.98/var/cvs/llvm/llvm/include/llvm/Type.h,v Sticky Tag: (none) Sticky Date: (none) Sticky Options: (none) I know you can retrieve this from CVS because I just did it 2 hours ago to merge the BoolTy-Int1Ty changes into another working tree. Reid. Reid Spencer wrote: All, Please apply this patch to llvm-gcc r247. It adjusts llvm-gcc for recent changes in LLVM related to the BoolTy. BoolTy-Int1Ty ConstantBool-ConstantInt ConstantIntegral-ConstantInt Reid Index: gcc/llvm-backend.cpp === --- gcc/llvm-backend.cpp (revision 247) +++ gcc/llvm-backend.cpp (working copy) @@ -569,7 +569,7 @@ // If this has already been processed, don't emit duplicate error messages. if (DECL_LLVM_SET_P(decl)) { // Error state encoded into DECL_LLVM. -return castConstantBool(DECL_LLVM(decl))-getValue(); +return castConstantInt(DECL_LLVM(decl))-getBoolValue(); } /* Detect errors in declaring global registers. */ @@ -593,10 +593,10 @@ if (TREE_THIS_VOLATILE(decl)) warning(volatile register variables don%'t work as you might wish); -SET_DECL_LLVM(decl, ConstantBool::getFalse()); +SET_DECL_LLVM(decl, ConstantInt::getFalse()); return false; // Everything ok. } - SET_DECL_LLVM(decl, ConstantBool::getTrue()); + SET_DECL_LLVM(decl, ConstantInt::getTrue()); return true; } Index: gcc/llvm-convert.cpp === --- gcc/llvm-convert.cpp (revision 247) +++ gcc/llvm-convert.cpp (working copy) @@ -713,7 +713,7 @@ // Handle cast (cast bool X to T2) to bool as X, because this occurs all over // the place. if (CastInst *CI = dyn_castCastInst(V)) -if (Ty == Type::BoolTy CI-getOperand(0)-getType() == Type::BoolTy) +if (Ty == Type::Int1Ty CI-getOperand(0)-getType()
Re: [llvm-commits] [llvm-gcc] Changes In Boolean (please commit)
Not that message. this one: = OK, so I figured I need to update LLVM. Now that doesn't build: llvm[2]: Compiling Lexer.cpp for Debug build Lexer.cpp: In function 'int llvmAsmlex()': Lexer.cpp:1244: error: label 'find_rule' used but not defined gmake[2]: *** [/usr/home/jeffc/llvm/obj/lib/AsmParser/Debug/Lexer.o] Error 1 I think I'll just go away for a few weeks and wait for the dust to settle = Reid Spencer wrote: Jeff, That just can't be .. see below On Thu, 2007-01-11 at 12:57 -0800, Jeff Cohen wrote: See my previous message. I updated, and LLVM no longer builds. Reid Spencer wrote: You need to update your LLVM tree. I just committed the BoolTy-Int1Ty change and the patch handles that change as well. Reid. On Thu, 2007-01-11 at 12:24 -0800, Jeff Cohen wrote: The patch doesn't work: g++40 -c -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -pedantic -Wno-long-long -Wno-variadic-macros -fno-common -DHAVE_CONFIG_H -Wno-unused -DTARGET_NAME=\amd64-unknown-freebsd6.1\ -DENABLE_LLVM -D__STDC_LIMIT_MACROS -I. -I. -I../../gcc -I../../gcc/. -I../../gcc/../include -I../../gcc/../libcpp/include -I/usr/home/jeffc/llvm/include -I/home/jeffc/llvm/obj/include ../../gcc/llvm-debug.cpp -o llvm-debug.o ../../gcc/llvm-types.cpp: In member function 'const llvm::Type* TypeConverter::ConvertType(tree_node*)': ../../gcc/llvm-types.cpp:291: error: 'Int1Ty' is not a member of 'llvm::Type' Int1Ty is now a member of the Type class. I double checked to make sure I committed everything. If you're getting this error then you've still got a Type.h file that is defining BoolTy instead of Int1Ty. For whatever reason, you're not at TOT for LLVM! ../../gcc/llvm-types.cpp: In member function 'voidunnamed::FunctionTypeConversion::HandleScalarArgument(const llvm::Type*, tree_node*)': ../../gcc/llvm-types.cpp:520: error: 'Int1Ty' is not a member of 'llvm::Type' Same. gmake[1]: *** [llvm-types.o] Error 1 gmake[1]: *** Waiting for unfinished jobs ../../gcc/llvm-convert.cpp: In member function 'llvm::Value* TreeToLLVM::CastToType(unsigned int, llvm::Value*, const llvm::Type*)': ../../gcc/llvm-convert.cpp:716: error: 'Int1Ty' is not a member of 'llvm::Type' Same. ../../gcc/llvm-convert.cpp:716: error: 'Int1Ty' is not a member of 'llvm::Type' Same. ../../gcc/llvm-convert.cpp: In member function 'llvm::Value* TreeToLLVM::EmitCOND_EXPR(tree_node*)': ../../gcc/llvm-convert.cpp:1390: error: 'Int1Ty' is not a member of 'llvm::Type' Same. ../../gcc/llvm-convert.cpp: In member function 'llvm::Value* TreeToLLVM::EmitTRUTH_NOT_EXPR(tree_node*)': ../../gcc/llvm-convert.cpp:2379: error: 'Int1Ty' is not a member of 'llvm::Type' Same. ../../gcc/llvm-convert.cpp: In member function 'LValue TreeToLLVM::EmitLV_COMPONENT_REF(tree_node*)': ../../gcc/llvm-convert.cpp:4041: error: 'Int1Ty' is not a member of 'llvm::Type' Same. If these are all the errors you're getting, then its very clear you are not at HEAD revision for LLVM. Check your revision number for include/llvm/Type.h. It should be revision 1.98: cvs status include/llvm/Type.h === File: Type.hStatus: Up-to-date Working revision:1.98 Repository revision: 1.98/var/cvs/llvm/llvm/include/llvm/Type.h,v Sticky Tag: (none) Sticky Date: (none) Sticky Options: (none) I know you can retrieve this from CVS because I just did it 2 hours ago to merge the BoolTy-Int1Ty changes into another working tree. Reid. Reid Spencer wrote: All, Please apply this patch to llvm-gcc r247. It adjusts llvm-gcc for recent changes in LLVM related to the BoolTy. BoolTy-Int1Ty ConstantBool-ConstantInt ConstantIntegral-ConstantInt Reid Index: gcc/llvm-backend.cpp === --- gcc/llvm-backend.cpp (revision 247) +++ gcc/llvm-backend.cpp (working copy) @@ -569,7 +569,7 @@ // If this has already been processed, don't emit duplicate error messages. if (DECL_LLVM_SET_P(decl)) { // Error state encoded into DECL_LLVM. -return castConstantBool(DECL_LLVM(decl))-getValue(); +return castConstantInt(DECL_LLVM(decl))-getBoolValue(); } /* Detect errors in declaring global registers. */ @@ -593,10 +593,10 @@ if (TREE_THIS_VOLATILE(decl)) warning(volatile register variables don%'t work as you might wish); -SET_DECL_LLVM(decl, ConstantBool::getFalse()); +SET_DECL_LLVM(decl, ConstantInt::getFalse()); return false; // Everything ok. } - SET_DECL_LLVM(decl, ConstantBool::getTrue()); + SET_DECL_LLVM(decl,
Re: [llvm-commits] [llvm-gcc] Changes In Boolean (please commit)
On Thu, 2007-01-11 at 12:38 -0800, Jeff Cohen wrote: OK, so I figured I need to update LLVM. Now that doesn't build: llvm[2]: Compiling Lexer.cpp for Debug build Lexer.cpp: In function 'int llvmAsmlex()': Lexer.cpp:1244: error: label 'find_rule' used but not defined gmake[2]: *** [/usr/home/jeffc/llvm/obj/lib/AsmParser/Debug/Lexer.o] Error 1 I think I'll just go away for a few weeks and wait for the dust to settle I just got this email now .. no wonder I was confused. Jeff Cohen wrote: The patch doesn't work: g++40 -c -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -pedantic -Wno-long-long -Wno-variadic-macros -fno-common -DHAVE_CONFIG_H -Wno-unused -DTARGET_NAME=\amd64-unknown-freebsd6.1\ -DENABLE_LLVM -D__STDC_LIMIT_MACROS -I. -I. -I../../gcc -I../../gcc/. -I../../gcc/../include -I../../gcc/../libcpp/include -I/usr/home/jeffc/llvm/include -I/home/jeffc/llvm/obj/include ../../gcc/llvm-debug.cpp -o llvm-debug.o ../../gcc/llvm-types.cpp: In member function 'const llvm::Type* TypeConverter::ConvertType(tree_node*)': ../../gcc/llvm-types.cpp:291: error: 'Int1Ty' is not a member of 'llvm::Type' ../../gcc/llvm-types.cpp: In member function 'voidunnamed::FunctionTypeConversion::HandleScalarArgument(const llvm::Type*, tree_node*)': ../../gcc/llvm-types.cpp:520: error: 'Int1Ty' is not a member of 'llvm::Type' gmake[1]: *** [llvm-types.o] Error 1 gmake[1]: *** Waiting for unfinished jobs ../../gcc/llvm-convert.cpp: In member function 'llvm::Value* TreeToLLVM::CastToType(unsigned int, llvm::Value*, const llvm::Type*)': ../../gcc/llvm-convert.cpp:716: error: 'Int1Ty' is not a member of 'llvm::Type' ../../gcc/llvm-convert.cpp:716: error: 'Int1Ty' is not a member of 'llvm::Type' ../../gcc/llvm-convert.cpp: In member function 'llvm::Value* TreeToLLVM::EmitCOND_EXPR(tree_node*)': ../../gcc/llvm-convert.cpp:1390: error: 'Int1Ty' is not a member of 'llvm::Type' ../../gcc/llvm-convert.cpp: In member function 'llvm::Value* TreeToLLVM::EmitTRUTH_NOT_EXPR(tree_node*)': ../../gcc/llvm-convert.cpp:2379: error: 'Int1Ty' is not a member of 'llvm::Type' ../../gcc/llvm-convert.cpp: In member function 'LValue TreeToLLVM::EmitLV_COMPONENT_REF(tree_node*)': ../../gcc/llvm-convert.cpp:4041: error: 'Int1Ty' is not a member of 'llvm::Type' Reid Spencer wrote: All, Please apply this patch to llvm-gcc r247. It adjusts llvm-gcc for recent changes in LLVM related to the BoolTy. BoolTy-Int1Ty ConstantBool-ConstantInt ConstantIntegral-ConstantInt Reid Index: gcc/llvm-backend.cpp === --- gcc/llvm-backend.cpp (revision 247) +++ gcc/llvm-backend.cpp (working copy) @@ -569,7 +569,7 @@ // If this has already been processed, don't emit duplicate error messages. if (DECL_LLVM_SET_P(decl)) { // Error state encoded into DECL_LLVM. -return castConstantBool(DECL_LLVM(decl))-getValue(); +return castConstantInt(DECL_LLVM(decl))-getBoolValue(); } /* Detect errors in declaring global registers. */ @@ -593,10 +593,10 @@ if (TREE_THIS_VOLATILE(decl)) warning(volatile register variables don%'t work as you might wish); -SET_DECL_LLVM(decl, ConstantBool::getFalse()); +SET_DECL_LLVM(decl, ConstantInt::getFalse()); return false; // Everything ok. } - SET_DECL_LLVM(decl, ConstantBool::getTrue()); + SET_DECL_LLVM(decl, ConstantInt::getTrue()); return true; } Index: gcc/llvm-convert.cpp === --- gcc/llvm-convert.cpp (revision 247) +++ gcc/llvm-convert.cpp (working copy) @@ -713,7 +713,7 @@ // Handle cast (cast bool X to T2) to bool as X, because this occurs all over // the place. if (CastInst *CI = dyn_castCastInst(V)) -if (Ty == Type::BoolTy CI-getOperand(0)-getType() == Type::BoolTy) +if (Ty == Type::Int1Ty CI-getOperand(0)-getType() == Type::Int1Ty) return CI-getOperand(0); return CastInst::create(Instruction::CastOps(opcode), V, Ty, V-getName(), CurBB); @@ -1384,10 +1384,10 @@ } Value *TreeToLLVM::EmitCOND_EXPR(tree exp) { - // Emit the conditional expression and trunc/bitcast to BoolTy + // Emit the conditional expression and trunc/bitcast to Int1Ty Value *Cond = Emit(COND_EXPR_COND(exp), 0); // If its not already a bool, insert a comparison against zero to make it so. - if (Cond-getType() != Type::BoolTy) + if (Cond-getType() != Type::Int1Ty) Cond = new ICmpInst(ICmpInst::ICMP_NE, Cond, Constant::getNullValue(Cond-getType()), toBool, CurBB); @@ -2376,7 +2376,7 @@ Value
Re: [llvm-commits] [llvm-gcc] Changes In Boolean (please commit)
On Thu, 2007-01-11 at 13:19 -0800, Jeff Cohen wrote: Not that message. this one: = OK, so I figured I need to update LLVM. Now that doesn't build: llvm[2]: Compiling Lexer.cpp for Debug build Lexer.cpp: In function 'int llvmAsmlex()': Lexer.cpp:1244: error: label 'find_rule' used but not defined gmake[2]: *** [/usr/home/jeffc/llvm/obj/lib/AsmParser/Debug/Lexer.o] Error 1 That is supposed to be a warning on all systems with our Makefile system. What compiler and operating system are you using? This stems from use of -Wno-unused. Which should produce a warning on unused things such as this label. Do you have local Makefile changes that upgrade this from a warning to an error? Reid. I think I'll just go away for a few weeks and wait for the dust to settle = Reid Spencer wrote: Jeff, That just can't be .. see below On Thu, 2007-01-11 at 12:57 -0800, Jeff Cohen wrote: See my previous message. I updated, and LLVM no longer builds. Reid Spencer wrote: You need to update your LLVM tree. I just committed the BoolTy-Int1Ty change and the patch handles that change as well. Reid. On Thu, 2007-01-11 at 12:24 -0800, Jeff Cohen wrote: The patch doesn't work: g++40 -c -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -pedantic -Wno-long-long -Wno-variadic-macros -fno-common -DHAVE_CONFIG_H -Wno-unused -DTARGET_NAME=\amd64-unknown-freebsd6.1\ -DENABLE_LLVM -D__STDC_LIMIT_MACROS -I. -I. -I../../gcc -I../../gcc/. -I../../gcc/../include -I../../gcc/../libcpp/include -I/usr/home/jeffc/llvm/include -I/home/jeffc/llvm/obj/include ../../gcc/llvm-debug.cpp -o llvm-debug.o ../../gcc/llvm-types.cpp: In member function 'const llvm::Type* TypeConverter::ConvertType(tree_node*)': ../../gcc/llvm-types.cpp:291: error: 'Int1Ty' is not a member of 'llvm::Type' Int1Ty is now a member of the Type class. I double checked to make sure I committed everything. If you're getting this error then you've still got a Type.h file that is defining BoolTy instead of Int1Ty. For whatever reason, you're not at TOT for LLVM! ../../gcc/llvm-types.cpp: In member function 'voidunnamed::FunctionTypeConversion::HandleScalarArgument(const llvm::Type*, tree_node*)': ../../gcc/llvm-types.cpp:520: error: 'Int1Ty' is not a member of 'llvm::Type' Same. gmake[1]: *** [llvm-types.o] Error 1 gmake[1]: *** Waiting for unfinished jobs ../../gcc/llvm-convert.cpp: In member function 'llvm::Value* TreeToLLVM::CastToType(unsigned int, llvm::Value*, const llvm::Type*)': ../../gcc/llvm-convert.cpp:716: error: 'Int1Ty' is not a member of 'llvm::Type' Same. ../../gcc/llvm-convert.cpp:716: error: 'Int1Ty' is not a member of 'llvm::Type' Same. ../../gcc/llvm-convert.cpp: In member function 'llvm::Value* TreeToLLVM::EmitCOND_EXPR(tree_node*)': ../../gcc/llvm-convert.cpp:1390: error: 'Int1Ty' is not a member of 'llvm::Type' Same. ../../gcc/llvm-convert.cpp: In member function 'llvm::Value* TreeToLLVM::EmitTRUTH_NOT_EXPR(tree_node*)': ../../gcc/llvm-convert.cpp:2379: error: 'Int1Ty' is not a member of 'llvm::Type' Same. ../../gcc/llvm-convert.cpp: In member function 'LValue TreeToLLVM::EmitLV_COMPONENT_REF(tree_node*)': ../../gcc/llvm-convert.cpp:4041: error: 'Int1Ty' is not a member of 'llvm::Type' Same. If these are all the errors you're getting, then its very clear you are not at HEAD revision for LLVM. Check your revision number for include/llvm/Type.h. It should be revision 1.98: cvs status include/llvm/Type.h === File: Type.hStatus: Up-to-date Working revision:1.98 Repository revision: 1.98/var/cvs/llvm/llvm/include/llvm/Type.h,v Sticky Tag: (none) Sticky Date: (none) Sticky Options: (none) I know you can retrieve this from CVS because I just did it 2 hours ago to merge the BoolTy-Int1Ty changes into another working tree. Reid. Reid Spencer wrote: All, Please apply this patch to llvm-gcc r247. It adjusts llvm-gcc for recent changes in LLVM related to the BoolTy. BoolTy-Int1Ty ConstantBool-ConstantInt ConstantIntegral-ConstantInt Reid Index: gcc/llvm-backend.cpp === --- gcc/llvm-backend.cpp(revision 247) +++ gcc/llvm-backend.cpp(working copy) @@ -569,7 +569,7 @@ // If this has already been processed, don't emit duplicate error messages. if (DECL_LLVM_SET_P(decl)) { // Error state encoded into DECL_LLVM. -return
Re: [llvm-commits] [llvm-gcc] Changes In Boolean (please commit)
On Thu, 2007-01-11 at 13:33 -0800, Jeff Cohen wrote: Reid Spencer wrote: On Thu, 2007-01-11 at 13:19 -0800, Jeff Cohen wrote: Not that message. this one: = OK, so I figured I need to update LLVM. Now that doesn't build: llvm[2]: Compiling Lexer.cpp for Debug build Lexer.cpp: In function 'int llvmAsmlex()': Lexer.cpp:1244: error: label 'find_rule' used but not defined gmake[2]: *** [/usr/home/jeffc/llvm/obj/lib/AsmParser/Debug/Lexer.o] Error 1 That is supposed to be a warning on all systems with our Makefile system. What compiler and operating system are you using? gcc 4.0 / FreeBSD 6.1 This stems from use of -Wno-unused. Which should produce a warning on unused things such as this label. Do you have local Makefile changes that upgrade this from a warning to an error? Look at the error more closely. It is not complaining about an unused label. That is a warning. It is complaining about using an undefined label. I have no local changes. Ah, yes, you're right. This is a result of stripping the label out in the Makefile. Your version of FLEX must actually us it or a REJECT was added recently. In any event, I'll fix the makefile in just a second and it should work for you again. Thanks for being dilligent on this through my misunderstanding of the situation. Reid. Reid. I think I'll just go away for a few weeks and wait for the dust to settle = Reid Spencer wrote: Jeff, That just can't be .. see below On Thu, 2007-01-11 at 12:57 -0800, Jeff Cohen wrote: See my previous message. I updated, and LLVM no longer builds. Reid Spencer wrote: You need to update your LLVM tree. I just committed the BoolTy-Int1Ty change and the patch handles that change as well. Reid. On Thu, 2007-01-11 at 12:24 -0800, Jeff Cohen wrote: The patch doesn't work: g++40 -c -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -pedantic -Wno-long-long -Wno-variadic-macros -fno-common -DHAVE_CONFIG_H -Wno-unused -DTARGET_NAME=\amd64-unknown-freebsd6.1\ -DENABLE_LLVM -D__STDC_LIMIT_MACROS -I. -I. -I../../gcc -I../../gcc/. -I../../gcc/../include -I../../gcc/../libcpp/include -I/usr/home/jeffc/llvm/include -I/home/jeffc/llvm/obj/include ../../gcc/llvm-debug.cpp -o llvm-debug.o ../../gcc/llvm-types.cpp: In member function 'const llvm::Type* TypeConverter::ConvertType(tree_node*)': ../../gcc/llvm-types.cpp:291: error: 'Int1Ty' is not a member of 'llvm::Type' Int1Ty is now a member of the Type class. I double checked to make sure I committed everything. If you're getting this error then you've still got a Type.h file that is defining BoolTy instead of Int1Ty. For whatever reason, you're not at TOT for LLVM! ../../gcc/llvm-types.cpp: In member function 'voidunnamed::FunctionTypeConversion::HandleScalarArgument(const llvm::Type*, tree_node*)': ../../gcc/llvm-types.cpp:520: error: 'Int1Ty' is not a member of 'llvm::Type' Same. gmake[1]: *** [llvm-types.o] Error 1 gmake[1]: *** Waiting for unfinished jobs ../../gcc/llvm-convert.cpp: In member function 'llvm::Value* TreeToLLVM::CastToType(unsigned int, llvm::Value*, const llvm::Type*)': ../../gcc/llvm-convert.cpp:716: error: 'Int1Ty' is not a member of 'llvm::Type' Same. ../../gcc/llvm-convert.cpp:716: error: 'Int1Ty' is not a member of 'llvm::Type' Same. ../../gcc/llvm-convert.cpp: In member function 'llvm::Value* TreeToLLVM::EmitCOND_EXPR(tree_node*)': ../../gcc/llvm-convert.cpp:1390: error: 'Int1Ty' is not a member of 'llvm::Type' Same. ../../gcc/llvm-convert.cpp: In member function 'llvm::Value* TreeToLLVM::EmitTRUTH_NOT_EXPR(tree_node*)': ../../gcc/llvm-convert.cpp:2379: error: 'Int1Ty' is not a member of 'llvm::Type' Same. ../../gcc/llvm-convert.cpp: In member function 'LValue TreeToLLVM::EmitLV_COMPONENT_REF(tree_node*)': ../../gcc/llvm-convert.cpp:4041: error: 'Int1Ty' is not a member of 'llvm::Type' Same. If these are all the errors you're getting, then its very clear you are not at HEAD revision for LLVM. Check your revision number for include/llvm/Type.h. It should be revision 1.98: cvs status include/llvm/Type.h === File: Type.hStatus: Up-to-date Working revision:1.98 Repository revision: 1.98/var/cvs/llvm/llvm/include/llvm/Type.h,v Sticky Tag: (none) Sticky Date: (none) Sticky Options: (none) I know you can retrieve this from CVS because I just
Re: [llvm-commits] [llvm-gcc] Changes In Boolean (please commit)
Reid Spencer wrote: On Thu, 2007-01-11 at 13:33 -0800, Jeff Cohen wrote: Look at the error more closely. It is not complaining about an unused label. That is a warning. It is complaining about using an undefined label. I have no local changes. Ah, yes, you're right. This is a result of stripping the label out in the Makefile. Your version of FLEX must actually us it or a REJECT was added recently. In any event, I'll fix the makefile in just a second and it should work for you again. Thanks for being dilligent on this through my misunderstanding of the situation. Reid. I'm using version 2.5.4. Flex has been stable for ages, so I'm surprised if everyone isn't using the same version. ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
Re: [llvm-commits] [llvm-gcc] Changes In Boolean (please commit)
Jeff Cohen wrote: Reid Spencer wrote: On Thu, 2007-01-11 at 13:33 -0800, Jeff Cohen wrote: Look at the error more closely. It is not complaining about an unused label. That is a warning. It is complaining about using an undefined label. I have no local changes. Ah, yes, you're right. This is a result of stripping the label out in the Makefile. Your version of FLEX must actually us it or a REJECT was added recently. In any event, I'll fix the makefile in just a second and it should work for you again. Thanks for being dilligent on this through my misunderstanding of the situation. Reid. I'm using version 2.5.4. Flex has been stable for ages, so I'm surprised if everyone isn't using the same version. Also, I was not getting this error until just this past update. My version of flex definitely did not change. ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
Re: [llvm-commits] [llvm-gcc] Changes In Boolean (please commit)
Jeff Cohen wrote: Jeff Cohen wrote: Reid Spencer wrote: On Thu, 2007-01-11 at 13:33 -0800, Jeff Cohen wrote: Look at the error more closely. It is not complaining about an unused label. That is a warning. It is complaining about using an undefined label. I have no local changes. Ah, yes, you're right. This is a result of stripping the label out in the Makefile. Your version of FLEX must actually us it or a REJECT was added recently. In any event, I'll fix the makefile in just a second and it should work for you again. Thanks for being dilligent on this through my misunderstanding of the situation. Reid. I'm using version 2.5.4. Flex has been stable for ages, so I'm surprised if everyone isn't using the same version. Also, I was not getting this error until just this past update. My version of flex definitely did not change. And it turns out I wasn't running flex anyway. The build still fails because you did not regenerate the *.cvs files. When I touched the *.l files, the problem went away. ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
Re: [llvm-commits] [llvm-gcc] Changes In Boolean (please commit)
Reid Spencer wrote: On Thu, 2007-01-11 at 13:19 -0800, Jeff Cohen wrote: Not that message. this one: = OK, so I figured I need to update LLVM. Now that doesn't build: llvm[2]: Compiling Lexer.cpp for Debug build Lexer.cpp: In function 'int llvmAsmlex()': Lexer.cpp:1244: error: label 'find_rule' used but not defined gmake[2]: *** [/usr/home/jeffc/llvm/obj/lib/AsmParser/Debug/Lexer.o] Error 1 That is supposed to be a warning on all systems with our Makefile system. What compiler and operating system are you using? gcc 4.0 / FreeBSD 6.1 This stems from use of -Wno-unused. Which should produce a warning on unused things such as this label. Do you have local Makefile changes that upgrade this from a warning to an error? Look at the error more closely. It is not complaining about an unused label. That is a warning. It is complaining about using an undefined label. I have no local changes. Reid. I think I'll just go away for a few weeks and wait for the dust to settle = Reid Spencer wrote: Jeff, That just can't be .. see below On Thu, 2007-01-11 at 12:57 -0800, Jeff Cohen wrote: See my previous message. I updated, and LLVM no longer builds. Reid Spencer wrote: You need to update your LLVM tree. I just committed the BoolTy-Int1Ty change and the patch handles that change as well. Reid. On Thu, 2007-01-11 at 12:24 -0800, Jeff Cohen wrote: The patch doesn't work: g++40 -c -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -pedantic -Wno-long-long -Wno-variadic-macros -fno-common -DHAVE_CONFIG_H -Wno-unused -DTARGET_NAME=\amd64-unknown-freebsd6.1\ -DENABLE_LLVM -D__STDC_LIMIT_MACROS -I. -I. -I../../gcc -I../../gcc/. -I../../gcc/../include -I../../gcc/../libcpp/include -I/usr/home/jeffc/llvm/include -I/home/jeffc/llvm/obj/include ../../gcc/llvm-debug.cpp -o llvm-debug.o ../../gcc/llvm-types.cpp: In member function 'const llvm::Type* TypeConverter::ConvertType(tree_node*)': ../../gcc/llvm-types.cpp:291: error: 'Int1Ty' is not a member of 'llvm::Type' Int1Ty is now a member of the Type class. I double checked to make sure I committed everything. If you're getting this error then you've still got a Type.h file that is defining BoolTy instead of Int1Ty. For whatever reason, you're not at TOT for LLVM! ../../gcc/llvm-types.cpp: In member function 'voidunnamed::FunctionTypeConversion::HandleScalarArgument(const llvm::Type*, tree_node*)': ../../gcc/llvm-types.cpp:520: error: 'Int1Ty' is not a member of 'llvm::Type' Same. gmake[1]: *** [llvm-types.o] Error 1 gmake[1]: *** Waiting for unfinished jobs ../../gcc/llvm-convert.cpp: In member function 'llvm::Value* TreeToLLVM::CastToType(unsigned int, llvm::Value*, const llvm::Type*)': ../../gcc/llvm-convert.cpp:716: error: 'Int1Ty' is not a member of 'llvm::Type' Same. ../../gcc/llvm-convert.cpp:716: error: 'Int1Ty' is not a member of 'llvm::Type' Same. ../../gcc/llvm-convert.cpp: In member function 'llvm::Value* TreeToLLVM::EmitCOND_EXPR(tree_node*)': ../../gcc/llvm-convert.cpp:1390: error: 'Int1Ty' is not a member of 'llvm::Type' Same. ../../gcc/llvm-convert.cpp: In member function 'llvm::Value* TreeToLLVM::EmitTRUTH_NOT_EXPR(tree_node*)': ../../gcc/llvm-convert.cpp:2379: error: 'Int1Ty' is not a member of 'llvm::Type' Same. ../../gcc/llvm-convert.cpp: In member function 'LValue TreeToLLVM::EmitLV_COMPONENT_REF(tree_node*)': ../../gcc/llvm-convert.cpp:4041: error: 'Int1Ty' is not a member of 'llvm::Type' Same. If these are all the errors you're getting, then its very clear you are not at HEAD revision for LLVM. Check your revision number for include/llvm/Type.h. It should be revision 1.98: cvs status include/llvm/Type.h === File: Type.hStatus: Up-to-date Working revision:1.98 Repository revision: 1.98/var/cvs/llvm/llvm/include/llvm/Type.h,v Sticky Tag: (none) Sticky Date: (none) Sticky Options: (none) I know you can retrieve this from CVS because I just did it 2 hours ago to merge the BoolTy-Int1Ty changes into another working tree. Reid. Reid Spencer wrote: All, Please apply this patch to llvm-gcc r247. It adjusts llvm-gcc for recent changes in LLVM related to the BoolTy. BoolTy-Int1Ty ConstantBool-ConstantInt ConstantIntegral-ConstantInt Reid Index: gcc/llvm-backend.cpp === ---
Re: [llvm-commits] [llvm-gcc] Changes In Boolean (please commit)
When diffing the code generated by my version of flex against Lexer.cpp.cvs, and excluding the #line directives, I get this: 23,24c23 * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp $ * $FreeBSD: src/usr.bin/lex/flex.skl,v 1.8 2004/01/06 19:03:44 nectar Exp $ --- * $Header: /var/cvs/llvm/llvm/lib/AsmParser/Lexer.cpp.cvs,v 1.22 2007/01/11 18:21:28 reid Exp $ 27,32d25 #if defined(__FreeBSD__) #include sys/cdefs.h #else #define __unused #endif 37a31 #include unistd.h 51d44 #include unistd.h 162a156,164 /* Some routines like yy_flex_realloc() are emitted as static but are not called by all lexers. This generates warnings in some compilers, notably GCC. Arrange to suppress these. */ #ifdef __GNUC__ #define YY_MAY_BE_UNUSED __attribute__((unused)) #else #define YY_MAY_BE_UNUSED #endif 269c271 static inline void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )) __unused; --- static inline void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )) YY_MAY_BE_UNUSED; 1178c1180 register char *yy_cp, *yy_bp; --- register char *yy_cp = NULL, *yy_bp = NULL; 1244,1245c1246 goto find_rule; /* avoid `defined but not used' warning */ find_rule: /* we branch to this label when backing up */ --- 2396a2398 #ifndef YY_NO_INPUT 2470c2472 --- #endif /* YY_NO_INPUT */ 2581,2585d2582 #ifndef YY_ALWAYS_INTERACTIVE #ifndef YY_NEVER_INTERACTIVE extern int isatty YY_PROTO(( int )); #endif #endif FreeBSD has it's own solution to suppressing the warning: just throw in a gratuitous goto find_rule. Looking at this diff, it looks like it may not be a good idea to catch the output of flex. It isn't as platform-independent as we'd like. Unfortunately, some platforms don't come with flex as standard equipment. No obvious easy solution. ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits