search for: string_cst

Displaying 10 results from an estimated 10 matches for "string_cst".

2006 Sep 05
2
[LLVMdev] gfortran: array constructor problems
...Chris's previous email, I rebuilt LLVM with debugging info, and then rebuilt gcc4 with CHECKING_ENABLED. In the process, I ran into an assertion error when compiling the first part of libgfortran: ../../src/gcc/llvm-convert.cpp:3871: failed assertion `(TREE_CONSTANT(exp) || TREE_CODE(exp) == STRING_CST) && "Isn't a constant!"' In this case, TreeConstantToLLVM::Convert() is getting a constant to convert that fails the test "TREE_CONSTANT(exp)" (from my gdb session:) >Breakpoint 2, TreeConstantToLLVM::Convert (exp=0x45e48c60) at ../../src/gcc/llvm-convert.cp...
2006 Sep 06
0
[LLVMdev] gfortran: array constructor problems
...uilt LLVM with debugging info, and then rebuilt gcc4 with > CHECKING_ENABLED. > > In the process, I ran into an assertion error when compiling the first > part of libgfortran: ok. > ../../src/gcc/llvm-convert.cpp:3871: failed assertion > `(TREE_CONSTANT(exp) || TREE_CODE(exp) == STRING_CST) && "Isn't a > constant!"' > > In this case, TreeConstantToLLVM::Convert() is getting a constant to > convert that fails the test "TREE_CONSTANT(exp)" > (from my gdb session:) .. > I'm not entirely sure how to proceed here, so any advice wou...
2009 Jan 09
2
[LLVMdev] RFC: Store alignment should be LValue alignment, not source alignment
...50,9 +1150,18 @@ LValue TreeToLLVM::EmitLV(tree exp) { case IMAGPART_EXPR: return EmitLV_XXXXPART_EXPR(exp, 1); // Constants. - case LABEL_DECL: return TreeConstantToLLVM::EmitLV_LABEL_DECL(exp); - case COMPLEX_CST: return LValue(TreeConstantToLLVM::EmitLV_COMPLEX_CST(exp)); - case STRING_CST: return LValue(TreeConstantToLLVM::EmitLV_STRING_CST(exp)); + case LABEL_DECL: { + Value *Ptr = TreeConstantToLLVM::EmitLV_LABEL_DECL(exp); + return LValue(Ptr, DECL_ALIGN(exp) / 8); + } + case COMPLEX_CST: { + Value *Ptr = TreeConstantToLLVM::EmitLV_COMPLEX_CST(exp); + return LV...
2009 Jan 09
0
[LLVMdev] RFC: Store alignment should be LValue alignment, not source alignment
...Value *Ptr = TreeConstantToLLVM::EmitLV_LABEL_DECL(exp); > + return LValue(Ptr, DECL_ALIGN(exp) / 8); > + } > + case COMPLEX_CST: { > + Value *Ptr = TreeConstantToLLVM::EmitLV_COMPLEX_CST(exp); > + return LValue(Ptr, TYPE_ALIGN(TREE_TYPE(exp)) / 8); > + } > + case STRING_CST: { > + Value *Ptr = TreeConstantToLLVM::EmitLV_STRING_CST(exp); > + return LValue(Ptr, TYPE_ALIGN(TREE_TYPE(exp)) / 8); > + } These are all equivalent to using expr_align, right? > @@ -2290,7 +2301,7 @@ Value *TreeToLLVM::EmitLoadOfLValue(tree > LValue LV = EmitLV(exp);...
2009 Jun 03
1
[LLVMdev] RFA: Alignment of Strings
...ome error message that is kind of longish." Note that the alignment in LLVM is greater than it is for GCC. When I look at the alignment of the string in GDB, the front-end is saying that it's 8, which would be '.align 3'. I have a patch below that sets the alignment explicitly for STRING_CST types. My question is two-fold: * Is the patch good? I don't *think* that it will break anything else in the front-end or for different platforms, but one never knows, and, * What magick is GCC performing to get the '.align 2' instead of '.align 3', which I would expect? Is t...
2007 Jan 11
1
[LLVMdev] Ada support for llvm-gcc4
Hello, Duncan. > 3-fortran.diff > Get fortran to compile: use the common stubs and rip out > the incomplete collection of dummy routines someone already put in. > With this patch, the fortran build dies at this point: > > cc1: llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp:367: void llvm::ScheduleDAG::AddOperand(llvm: > :MachineInstr*, llvm::SDOperand, unsigned int, const
2007 Nov 07
3
[LLVMdev] RFC: llvm-convert.cpp Patch
...it(tree exp, Value *DestLoc, unsigned Alignment) { assert((isAggregateTreeType(TREE_TYPE(exp)) == (DestLoc != 0) || TREE_CODE(exp) == MODIFY_EXPR) && "Didn't pass DestLoc to an aggregate expr, or passed it to scalar!"); @@ -811,7 +811,7 @@ case STRING_CST: case REALPART_EXPR: case IMAGPART_EXPR: - Result = EmitLoadOfLValue(exp, DestLoc); + Result = EmitLoadOfLValue(exp, DestLoc, Alignment); break; case OBJ_TYPE_REF: Result = EmitOBJ_TYPE_REF(exp); break; case ADDR_EXPR: Result = EmitADDR_EXPR(exp); break; @@ -2524,...
2006 Sep 06
2
[LLVMdev] gfortran: array constructor problems
On 9/6/06, Chris Lattner <sabre at nondot.org> wrote: > On Tue, 5 Sep 2006, Michael McCracken wrote: [snip] > > ../../src/gcc/llvm-convert.cpp:3871: failed assertion > > `(TREE_CONSTANT(exp) || TREE_CODE(exp) == STRING_CST) && "Isn't a > > constant!"' > > > > In this case, TreeConstantToLLVM::Convert() is getting a constant to > > convert that fails the test "TREE_CONSTANT(exp)" > > (from my gdb session:) > .. > > I'm not entirely sure how...
2007 Nov 07
0
[LLVMdev] RFC: llvm-convert.cpp Patch
On Nov 6, 2007, at 5:45 PM, Bill Wendling wrote: > Hi all, > > This patch is to fix a problem on PPC64 where an unaligned memcpy is > generated. The testcase is this: > > $ cat testcase.c > void Qux() { > char Bar[11] = {0}; > } > > What happens is that we produce LLVM code like this: > > call void @llvm.memcpy.i64( i8* %event_list2, i8* getelementptr ([11
2007 Nov 07
7
[LLVMdev] RFC: llvm-convert.cpp Patch
Hi all, This patch is to fix a problem on PPC64 where an unaligned memcpy is generated. The testcase is this: $ cat testcase.c void Qux() { char Bar[11] = {0}; } What happens is that we produce LLVM code like this: call void @llvm.memcpy.i64( i8* %event_list2, i8* getelementptr ([11 x i8]* @C.103.30698, i32 0, i32 0), i64 11, i32 8 ) Notice that it has an 8-byte alignment. However, the Bar