Displaying 5 results from an estimated 5 matches for "result_decl".
2007 Oct 26
2
[LLVMdev] RFC: llvm-convert.cpp Patch
...n 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 the alignment of the destination
+ // pointer. It may not match the alignment of the source pointer. So, we
+ // need to make sure that it's has at least its alignment.
+ tree new_exp = copy_node(...
2007 Oct 26
0
[LLVMdev] RFC: llvm-convert.cpp Patch
...ing 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 the alignment of the destination
> + // pointer. It may not match the alignment of the source
> pointer. So, we
> + // need to make sure that it's has at least its alignment.
>...
2007 Nov 07
3
[LLVMdev] RFC: llvm-convert.cpp Patch
...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 copy into
Index: gcc/llvm-...
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