forked from OSchip/llvm-project
OpenMP: Name the values passed to the subfunciton according to the original llvm::Values
llvm-svn: 246924
This commit is contained in:
parent
0d8874c0f6
commit
72b80672d9
|
@ -303,6 +303,7 @@ void ParallelLoopGenerator::extractValuesFromStruct(
|
|||
for (unsigned i = 0; i < OldValues.size(); i++) {
|
||||
Value *Address = Builder.CreateStructGEP(Ty, Struct, i);
|
||||
Value *NewValue = Builder.CreateLoad(Address);
|
||||
NewValue->setName("polly.subfunc.arg." + OldValues[i]->getName());
|
||||
Map[OldValues[i]] = NewValue;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,20 +24,20 @@
|
|||
; AST: Stmt_for_body6(c0, c1, c2);
|
||||
|
||||
; IR: %polly.par.userContext = alloca { i64, i64 }
|
||||
; IR: %[[R0:[0-9]+]] = bitcast { i64, i64 }* %polly.par.userContext to i8*
|
||||
; IR: %[[R0:[0-9a-z.]+]] = bitcast { i64, i64 }* %polly.par.userContext to i8*
|
||||
; IR-NEXT: call void @llvm.lifetime.start(i64 16, i8* %[[R0]])
|
||||
; IR-NEXT: %[[R1:[0-9]+]] = getelementptr inbounds { i64, i64 }, { i64, i64 }* %polly.par.userContext, i32 0, i32 0
|
||||
; IR-NEXT: %[[R1:[0-9a-z.]+]] = getelementptr inbounds { i64, i64 }, { i64, i64 }* %polly.par.userContext, i32 0, i32 0
|
||||
; IR-NEXT: store i64 %n, i64* %[[R1]]
|
||||
; IR-NEXT: %[[R2:[0-9]+]] = getelementptr inbounds { i64, i64 }, { i64, i64 }* %polly.par.userContext, i32 0, i32 1
|
||||
; IR-NEXT: %[[R2:[0-9a-z.]+]] = getelementptr inbounds { i64, i64 }, { i64, i64 }* %polly.par.userContext, i32 0, i32 1
|
||||
; IR-NEXT: store i64 %polly.indvar, i64* %[[R2]]
|
||||
; IR-NEXT: %polly.par.userContext1 = bitcast { i64, i64 }* %polly.par.userContext to i8*
|
||||
|
||||
; IR-LABEL: @loop_references_outer_ids.polly.subfn(i8* %polly.par.userContext)
|
||||
; IR: %polly.par.userContext1 = bitcast i8* %polly.par.userContext to { i64, i64 }*
|
||||
; IR-NEXT: %[[R3:[0-9]+]] = getelementptr inbounds { i64, i64 }, { i64, i64 }* %polly.par.userContext1, i32 0, i32 0
|
||||
; IR-NEXT: %[[R4:[0-9]+]] = load i64, i64* %[[R3]]
|
||||
; IR-NEXT: %[[R5:[0-9]+]] = getelementptr inbounds { i64, i64 }, { i64, i64 }* %polly.par.userContext1, i32 0, i32 1
|
||||
; IR-NEXT: %[[R6:[0-9]+]] = load i64, i64* %[[R5]]
|
||||
; IR-NEXT: %[[R3:[0-9a-z.]+]] = getelementptr inbounds { i64, i64 }, { i64, i64 }* %polly.par.userContext1, i32 0, i32 0
|
||||
; IR-NEXT: %[[R4:[0-9a-z.]+]] = load i64, i64* %[[R3]]
|
||||
; IR-NEXT: %[[R5:[0-9a-z.]+]] = getelementptr inbounds { i64, i64 }, { i64, i64 }* %polly.par.userContext1, i32 0, i32 1
|
||||
; IR-NEXT: %[[R6:[0-9a-z.]+]] = load i64, i64* %[[R5]]
|
||||
|
||||
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
|
||||
|
||||
|
|
|
@ -19,18 +19,17 @@
|
|||
; CHECK: [n, m] -> { Stmt_bb4[i0, i1] -> MemRef_A[i0, 2i1] };
|
||||
; CHECK: new: [n, m] -> { Stmt_bb4[i0, i1] -> MemRef_A[i0, 43 + i1] };
|
||||
|
||||
; IR: %polly.access.mul. = mul i64 %polly.indvar, %3
|
||||
; IR: %11 = add nsw i64 %polly.indvar5, 13
|
||||
; IR: %polly.access.add. = add i64 %polly.access.mul., %11
|
||||
; IR: %polly.access. = getelementptr float, float* %5, i64 %polly.access.add.
|
||||
; IR: %tmp10_p_scalar_ = load float, float* %polly.access., align 4, !alias.scope !0, !noalias !2, !llvm.mem.parallel_loop_access !3
|
||||
|
||||
; IR: %polly.access.mul.9 = mul i64 %polly.indvar, %3
|
||||
; IR: %12 = add nsw i64 %polly.indvar5, 43
|
||||
; IR: %polly.access.add.10 = add i64 %polly.access.mul.9, %12
|
||||
; IR: %polly.access.11 = getelementptr float, float* %5, i64 %polly.access.add.10
|
||||
; IR: store float %p_tmp11, float* %polly.access.11, align 4, !alias.scope !0, !noalias !2, !llvm.mem.parallel_loop_access !3
|
||||
; IR: %polly.access.mul.polly.subfunc.arg.A = mul i64 %polly.indvar, %polly.subfunc.arg.m
|
||||
; IR: %8 = add nsw i64 %polly.indvar5, 13
|
||||
; IR: %polly.access.add.polly.subfunc.arg.A = add i64 %polly.access.mul.polly.subfunc.arg.A, %8
|
||||
; IR: %polly.access.polly.subfunc.arg.A = getelementptr float, float* %polly.subfunc.arg.A, i64 %polly.access.add.polly.subfunc.arg.A
|
||||
; IR: %tmp10_p_scalar_ = load float, float* %polly.access.polly.subfunc.arg.A, align 4, !alias.scope !0, !noalias !2, !llvm.mem.parallel_loop_access !3
|
||||
|
||||
; IR: %polly.access.mul.polly.subfunc.arg.A9 = mul i64 %polly.indvar, %polly.subfunc.arg.m
|
||||
; IR: %9 = add nsw i64 %polly.indvar5, 43
|
||||
; IR: %polly.access.add.polly.subfunc.arg.A10 = add i64 %polly.access.mul.polly.subfunc.arg.A9, %9
|
||||
; IR: %polly.access.polly.subfunc.arg.A11 = getelementptr float, float* %polly.subfunc.arg.A, i64 %polly.access.add.polly.subfunc.arg.A10
|
||||
; IR: store float %p_tmp11, float* %polly.access.polly.subfunc.arg.A11, align 4, !alias.scope !0, !noalias !2, !llvm.mem.parallel_
|
||||
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
|
||||
|
||||
define void @new_multidim_access(i64 %n, i64 %m, float* %A) {
|
||||
|
|
Loading…
Reference in New Issue