search for: decl_align

Displaying 6 results from an estimated 6 matches for "decl_align".

2007 Nov 07
0
[LLVMdev] RFC: llvm-convert.cpp Patch
...======================== > --- gimplify.c (revision 43658) > +++ gimplify.c (working copy) > @@ -2756,7 +2756,8 @@ > TREE_STATIC (new) = 1; > TREE_READONLY (new) = 1; > DECL_INITIAL (new) = ctor; > - if (align > DECL_ALIGN (new)) > + /* LLVM LOCAL - Set DECL_USER_ALIGN when equal */ > + if (align >= DECL_ALIGN (new)) > { > DECL_ALIGN (new) = align; > DECL_USER_ALIGN (new) = 1; > _________________________________...
2007 Nov 07
7
[LLVMdev] RFC: llvm-convert.cpp Patch
...=========================================================== --- gimplify.c (revision 43658) +++ gimplify.c (working copy) @@ -2756,7 +2756,8 @@ TREE_STATIC (new) = 1; TREE_READONLY (new) = 1; DECL_INITIAL (new) = ctor; - if (align > DECL_ALIGN (new)) + /* LLVM LOCAL - Set DECL_USER_ALIGN when equal */ + if (align >= DECL_ALIGN (new)) { DECL_ALIGN (new) = align; DECL_USER_ALIGN (new) = 1;
2007 Oct 26
2
[LLVMdev] RFC: llvm-convert.cpp Patch
...)); + unsigned NewAlignment = expr_align(new_exp) / 8; + Alignment = (Alignment < NewAlignment) ? Alignment : NewAlignment; + TYPE_ALIGN(TREE_TYPE(new_exp)) = Alignment; + + switch (TREE_CODE(new_exp)) { + case VAR_DECL: + case PARM_DECL: + case RESULT_DECL: + DECL_ALIGN (new_exp) = Alignment * 8; + break; + default: + break; + } + + Emit(new_exp, LV.Ptr); } 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 copy into
2009 Jan 09
0
[LLVMdev] RFC: Store alignment should be LValue alignment, not source alignment
...ew it carefully as I am not entirely > comfortable hacking on llvm-gcc. :-) In the long run, LValue and MemRef should be merged, but that can wait until later I suppose. > + 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 LValue(Ptr, TYPE_ALIGN(TREE_TYPE(exp)) / 8); > + } > + case STRING_CST: { > + Value *Ptr = TreeConstantToLLVM::EmitLV_STRING_CST(exp); > + return...
2009 Jan 09
2
[LLVMdev] RFC: Store alignment should be LValue alignment, not source alignment
...: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 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))...
2007 Oct 26
0
[LLVMdev] RFC: llvm-convert.cpp Patch
...ew_exp) / 8; > + Alignment = (Alignment < NewAlignment) ? Alignment : > NewAlignment; > + TYPE_ALIGN(TREE_TYPE(new_exp)) = Alignment; > + > + switch (TREE_CODE(new_exp)) { > + case VAR_DECL: > + case PARM_DECL: > + case RESULT_DECL: > + DECL_ALIGN (new_exp) = Alignment * 8; > + break; > + default: > + break; > + } > + > + Emit(new_exp, LV.Ptr); > } else { > // Need to do a volatile store into TREE_OPERAND(exp, 1). > To do this, we > // emit it into a temporary memory locati...