search for: decl_align_unit

Displaying 2 results from an estimated 2 matches for "decl_align_unit".

2009 Jan 09
0
[LLVMdev] RFC: Store alignment should be LValue alignment, not source alignment
..., NULL); > const PointerType *PTy = PointerType::getUnqual(Ty); > - return BitCastToType(Decl, PTy); > + unsigned Alignment = Ty->isSized() ? TD.getABITypeAlignment(Ty) : 1; Can't you just use expr_align here? That said, I'm not sure what this case is doing. > + if (DECL_ALIGN_UNIT(exp)) { > + if (DECL_USER_ALIGN(exp) || Alignment < > (unsigned)DECL_ALIGN_UNIT(exp)) > + Alignment = DECL_ALIGN_UNIT(exp); > + } > + > + return LValue(BitCastToType(Decl, PTy), Alignment); Since I don't know what this case handles, I can't comment on this....
2009 Jan 09
2
[LLVMdev] RFC: Store alignment should be LValue alignment, not source alignment
...@@ LValue TreeToLLVM::EmitLV_DECL(tree exp) // type void. if (Ty == Type::VoidTy) Ty = StructType::get(NULL, NULL); const PointerType *PTy = PointerType::getUnqual(Ty); - return BitCastToType(Decl, PTy); + unsigned Alignment = Ty->isSized() ? TD.getABITypeAlignment(Ty) : 1; + if (DECL_ALIGN_UNIT(exp)) { + if (DECL_USER_ALIGN(exp) || Alignment < (unsigned)DECL_ALIGN_UNIT(exp)) + Alignment = DECL_ALIGN_UNIT(exp); + } + + return LValue(BitCastToType(Decl, PTy), Alignment); } LValue TreeToLLVM::EmitLV_ARRAY_REF(tree exp) { @@ -5932,22 +5950,23 @@ LValue TreeToLLVM::EmitLV_A...