[polly] r246924 - OpenMP: Name the values passed to the subfunciton according to the original llvm::Values

Tobias Grosser via llvm-commits llvm-commits at lists.llvm.org
Sat Sep 5 03:41:19 PDT 2015


Author: grosser
Date: Sat Sep  5 05:41:19 2015
New Revision: 246924

URL: http://llvm.org/viewvc/llvm-project?rev=246924&view=rev
Log:
OpenMP: Name the values passed to the subfunciton according to the original llvm::Values

Modified:
    polly/trunk/lib/CodeGen/LoopGenerators.cpp
    polly/trunk/test/Isl/CodeGen/OpenMP/loop-bounds-reference-outer-ids.ll
    polly/trunk/test/Isl/CodeGen/OpenMP/new_multidim_access.ll

Modified: polly/trunk/lib/CodeGen/LoopGenerators.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/CodeGen/LoopGenerators.cpp?rev=246924&r1=246923&r2=246924&view=diff
==============================================================================
--- polly/trunk/lib/CodeGen/LoopGenerators.cpp (original)
+++ polly/trunk/lib/CodeGen/LoopGenerators.cpp Sat Sep  5 05:41:19 2015
@@ -303,6 +303,7 @@ void ParallelLoopGenerator::extractValue
   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;
   }
 }

Modified: polly/trunk/test/Isl/CodeGen/OpenMP/loop-bounds-reference-outer-ids.ll
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/Isl/CodeGen/OpenMP/loop-bounds-reference-outer-ids.ll?rev=246924&r1=246923&r2=246924&view=diff
==============================================================================
--- polly/trunk/test/Isl/CodeGen/OpenMP/loop-bounds-reference-outer-ids.ll (original)
+++ polly/trunk/test/Isl/CodeGen/OpenMP/loop-bounds-reference-outer-ids.ll Sat Sep  5 05:41:19 2015
@@ -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"
 

Modified: polly/trunk/test/Isl/CodeGen/OpenMP/new_multidim_access.ll
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/Isl/CodeGen/OpenMP/new_multidim_access.ll?rev=246924&r1=246923&r2=246924&view=diff
==============================================================================
--- polly/trunk/test/Isl/CodeGen/OpenMP/new_multidim_access.ll (original)
+++ polly/trunk/test/Isl/CodeGen/OpenMP/new_multidim_access.ll Sat Sep  5 05:41:19 2015
@@ -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) {




More information about the llvm-commits mailing list