search for: tree_operand

Displaying 17 results from an estimated 17 matches for "tree_operand".

2007 Oct 26
2
[LLVMdev] RFC: llvm-convert.cpp Patch
...cases, I can take the copy out.) Is this a good thing? Will it break the world? -bw Index: gcc/llvm-convert.cpp =================================================================== --- gcc/llvm-convert.cpp (revision 43366) +++ gcc/llvm-convert.cpp (working copy) @@ -3020,8 +3020,26 @@ Emit(TREE_OPERAND(exp, 1), LV.Ptr); EmitAggregateCopy(DestLoc, LV.Ptr, TREE_TYPE(exp), isVolatile, false, Alignment); } else if (!isVolatile && TREE_CODE(TREE_OPERAND(exp, 0))!=RESULT_DECL) { - Emit(TREE_OPERAND(exp, 1), LV.Ptr); + // At this point, Alignment is...
2009 Jan 09
2
[LLVMdev] RFC: Store alignment should be LValue alignment, not source alignment
...LValue(Ptr, TYPE_ALIGN(TREE_TYPE(exp)) / 8); + } // Type Conversion. case VIEW_CONVERT_EXPR: return EmitLV_VIEW_CONVERT_EXPR(exp); @@ -1165,9 +1174,11 @@ LValue TreeToLLVM::EmitLV(tree exp) { case WITH_SIZE_EXPR: // The address is the address of the operand. return EmitLV(TREE_OPERAND(exp, 0)); - case INDIRECT_REF: + case INDIRECT_REF: { // The lvalue is just the address. - return Emit(TREE_OPERAND(exp, 0), 0); + tree Op = TREE_OPERAND(exp, 0); + return LValue(Emit(Op, 0), expr_align(Op) / 8); + } } } @@ -2290,7 +2301,7 @@ Value *TreeToLLVM::EmitLoadOfLV...
2007 Oct 26
0
[LLVMdev] RFC: llvm-convert.cpp Patch
...good thing? Will it break the world? > > -bw > > Index: gcc/llvm-convert.cpp > =================================================================== > --- gcc/llvm-convert.cpp (revision 43366) > +++ gcc/llvm-convert.cpp (working copy) > @@ -3020,8 +3020,26 @@ > Emit(TREE_OPERAND(exp, 1), LV.Ptr); > EmitAggregateCopy(DestLoc, LV.Ptr, TREE_TYPE(exp), > isVolatile, false, > Alignment); > } else if (!isVolatile && TREE_CODE(TREE_OPERAND(exp, 0))! > =RESULT_DECL) { > - Emit(TREE_OPERAND(exp, 1), LV.Ptr); >...
2009 Jan 09
0
[LLVMdev] RFC: Store alignment should be LValue alignment, not source alignment
...= MinAlign(ArrayAlign, > TD.getABITypeSize(ElementTy)); Why these manipulations? These happens several more times below. > @@ -6028,8 +6063,9 @@ static unsigned getComponentRefOffsetInB > > LValue TreeToLLVM::EmitLV_COMPONENT_REF(tree exp) { > LValue StructAddrLV = EmitLV(TREE_OPERAND(exp, 0)); > - tree FieldDecl = TREE_OPERAND(exp, 1); > - > + tree FieldDecl = TREE_OPERAND(exp, 1); > + unsigned LVAlign = DECL_PACKED(FieldDecl) ? 1 : > StructAddrLV.Alignment; Can't this be expr_align(exp)? I'll stop here, because I still don't understand the nee...
2008 Feb 16
3
[LLVMdev] linux/x86-64 codegen support
See the bug for a reduction and the gimple trees. validate_arglist definately is rejecting the arglist in EmitBuiltinAlloca. (try: bool TreeToLLVM::EmitBuiltinAlloca(tree exp, Value *&Result) { tree arglist = TREE_OPERAND(exp, 1); if (!validate_arglist(arglist, INTEGER_TYPE, VOID_TYPE)) { debug_tree(arglist); return false; } Value *Amt = Emit(TREE_VALUE(arglist), 0); Amt = CastToSIntType(Amt, Type::Int32Ty); Result = Builder.CreateAlloca(Type::Int8Ty, Amt, "tmp"); return true; } for a p...
2007 Nov 07
3
[LLVMdev] RFC: llvm-convert.cpp Patch
...lign); Value *Val = LI; unsigned ValSizeInBits = Val->getType()->getPrimitiveSizeInBits(); @@ -3021,7 +3022,7 @@ EmitAggregateCopy(DestLoc, LV.Ptr, TREE_TYPE(exp), isVolatile, false, Alignment); } else if (!isVolatile && TREE_CODE(TREE_OPERAND(exp, 0)) != RESULT_DECL) { - Emit(TREE_OPERAND(exp, 1), LV.Ptr); + Emit(TREE_OPERAND(exp, 1), LV.Ptr, Alignment); } else { // Need to do a volatile store into TREE_OPERAND(exp, 1). To do this, we // emit it into a temporary memory location, then do a volatile...
2008 Feb 16
0
[LLVMdev] linux/x86-64 codegen support
...64 %tmp20 ) nounwind ; <i8*> [#uses=1] %tmp3 = call i8* @alloca( i64 %tmp2 ) nounwind ; <i8*> [#uses=1] I added some printfs around that code, running cc1 shows it never reaches the 2nd printf: 4762│ printf("HERE!!\n"); 4763│ tree arglist = TREE_OPERAND(exp, 1); 4764├> if (!validate_arglist(arglist, INTEGER_TYPE, VOID_TYPE)) 4765│ return false; 4766│ printf("THERE!!\n") Is there a way to nicely dump arglist? gdb's print *arglist shows too much information.... $ /home/edwin/llvm-svn/obj42/./prev-gcc/cc1 charset.i vprintf...
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
2008 Feb 16
2
[LLVMdev] linux/x86-64 codegen support
Interestingly, in the .i file there are 2 __builtin_alloca, and EmitBuiltinAlloca is only being called once. Andrew On 2/16/08, Andrew Lenharth <andrewl at lenharth.org> wrote: > libcpp/charset.c:631 turns into: > > %tmp16 = tail call i64 @strlen( i8* %to ) nounwind readonly > ; <i64> [#uses=1] > %tmp18 = tail call i64 @strlen( i8* %from ) nounwind
2007 Jul 17
0
[LLVMdev] Review: minor patches to llvm-gcc-4-2
...(exp) == ARRAY_REF) - && TREE_CODE (TREE_TYPE (exp)) == INTEGER_TYPE && + && TREE_CODE (TREE_TYPE (exp)) == INTEGER_TYPE /* LLVM LOCAL begin */ #if ENABLE_LLVM /* LLVM extends ARRAY_REF to allow pointers to be the base value. */ - (TREE_CODE (TREE_TYPE (TREE_OPERAND (exp, 0))) == ARRAY_TYPE) + && (TREE_CODE (TREE_TYPE (TREE_OPERAND (exp, 0))) == ARRAY_TYPE) #endif /* LLVM LOCAL end */ )
2006 Mar 07
0
[LLVMdev] Re: Re: Re: New GCC4-based C/C++/ObjC front-end for LLVM
...type > ../../2006-03-02-llvm-gcc-4/gcc/llvm-convert.cpp:1312: error: `int tsi_next' This is more strange. The code likes this for me: for (tree_stmt_iterator I = tsi_start(node); !tsi_end_p(I); tsi_next(&I)) if (TREE_CODE(tsi_stmt(I)) == LABEL_EXPR) SET_DECL_LLVM(TREE_OPERAND(tsi_stmt(I), 0), 0); Is this what you have? If so, can you send me the preprocessed source file? What host compiler are you using? -Chris -- http://nondot.org/sabre/ http://llvm.org/
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
2006 Mar 06
2
[LLVMdev] Re: Re: Re: New GCC4-based C/C++/ObjC front-end for LLVM
Chris Lattner wrote: > On Thu, 2 Mar 2006, Chris Lattner wrote: >>> Any ideas what could be wrong? >> >> Sorry for the delay, please try this tarball: >> http://nondot.org/sabre/2006-03-02-llvm-gcc-4.tar.gz > > Actually, do to a recent change in CVS, this tarball will probably not > work anymore. Please apply the attached (small) patch on top of it in >
2008 Feb 16
0
[LLVMdev] linux/x86-64 codegen support
On Feb 16, 2008, at 2:27 PM, Andrew Lenharth wrote: > See the bug for a reduction and the gimple trees. validate_arglist > definately is rejecting the arglist in EmitBuiltinAlloca. > > (try: > bool TreeToLLVM::EmitBuiltinAlloca(tree exp, Value *&Result) { > tree arglist = TREE_OPERAND(exp, 1); > if (!validate_arglist(arglist, INTEGER_TYPE, VOID_TYPE)) { > debug_tree(arglist); > return false; > } > Value *Amt = Emit(TREE_VALUE(arglist), 0); > Amt = CastToSIntType(Amt, Type::Int32Ty); > Result = Builder.CreateAlloca(Type::Int8Ty, Amt, "tmp&quot...
2006 Mar 07
1
[LLVMdev] Re: Re: Re: Re: New GCC4-based C/C++/ObjC front-end for LLVM
...onvert.cpp:1312: error: `int >> tsi_next' > > This is more strange. The code likes this for me: > > for (tree_stmt_iterator I = tsi_start(node); !tsi_end_p(I); > tsi_next(&I)) > if (TREE_CODE(tsi_stmt(I)) == LABEL_EXPR) > SET_DECL_LLVM(TREE_OPERAND(tsi_stmt(I), 0), 0); > > Is this what you have? Yes, but after removing ATTRIBUTE_UNUSED the second error is gone. <rumbling about syntax errors recovery quality in gcc.../> > What host compiler are you using? gcc version 3.3.5 (Debian 1:3.3.5-13) Should handle attributes ju...
2011 Jul 18
5
[LLVMdev] dragonegg svn still broken
...claration' 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])...
2011 Jul 18
0
[LLVMdev] dragonegg svn still broken
...etDeclaration(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]) >...