[PATCH] D33768: [Polly] Exclude Ignored Intrinsics from explicit instruction list

Nandini Singhal via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 1 03:52:38 PDT 2017


nandini12396 added a comment.

Sorry I copied wrong output:

  ; ModuleID = '../llvm/tools/polly/test/Isl/CodeGen/intrinsics_misc_1.ll'
  source_filename = "../llvm/tools/polly/test/Isl/CodeGen/intrinsics_misc_1.ll"
  target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
  
  @A = global [1024 x i32] zeroinitializer, align 16
  @B = global [1024 x i32] zeroinitializer, align 16
  
  ; Function Attrs: noinline nounwind uwtable
  define void @_Z2jdv() #0 {
  entry:
    br label %polly.split_new_and_old
  
  polly.split_new_and_old:                          ; preds = %entry
    br i1 true, label %polly.start, label %for.cond.pre_entry_bb
  
  for.cond.pre_entry_bb:                            ; preds = %polly.split_new_and_old
    br label %for.cond
  
  for.cond:                                         ; preds = %for.cond.pre_entry_bb, %for.inc10
    %i.0 = phi i32 [ %inc11, %for.inc10 ], [ 0, %for.cond.pre_entry_bb ]
    %cmp = icmp slt i32 %i.0, 1024
    br i1 %cmp, label %for.body, label %polly.merge_new_and_old
  
  for.body:                                         ; preds = %for.cond
    br label %for.cond1
  
  for.cond1:                                        ; preds = %for.inc, %for.body
    %j.0 = phi i32 [ %i.0, %for.body ], [ %inc, %for.inc ]
    %cmp2 = icmp slt i32 %j.0, 1024
    br i1 %cmp2, label %for.body3, label %for.end
  
  for.body3:                                        ; preds = %for.cond1
    %idxprom = sext i32 %j.0 to i64
    %arrayidx = getelementptr inbounds [1024 x i32], [1024 x i32]* @B, i64 0, i64 %idxprom
    %0 = load i32, i32* %arrayidx, align 4
    %idxprom4 = sext i32 %i.0 to i64
    %arrayidx5 = getelementptr inbounds [1024 x i32], [1024 x i32]* @B, i64 0, i64 %idxprom4
    call void @llvm.donothing()
    %1 = load i32, i32* %arrayidx5, align 4
    %add = add nsw i32 %1, %0
    store i32 %add, i32* %arrayidx5, align 4
    br label %for.inc
  
  for.inc:                                          ; preds = %for.body3
    %inc = add nsw i32 %j.0, 1
    br label %for.cond1
  
  for.end:                                          ; preds = %for.cond1
    %idxprom6 = sext i32 %i.0 to i64
    %arrayidx7 = getelementptr inbounds [1024 x i32], [1024 x i32]* @B, i64 0, i64 %idxprom6
    %2 = load i32, i32* %arrayidx7, align 4
    %idxprom8 = sext i32 %i.0 to i64
    %arrayidx9 = getelementptr inbounds [1024 x i32], [1024 x i32]* @A, i64 0, i64 %idxprom8
    store i32 %2, i32* %arrayidx9, align 4
    br label %for.inc10
  
  for.inc10:                                        ; preds = %for.end
    %inc11 = add nsw i32 %i.0, 1
    br label %for.cond
  
  polly.merge_new_and_old:                          ; preds = %polly.exiting, %for.cond
    br label %for.end12
  
  for.end12:                                        ; preds = %polly.merge_new_and_old
    ret void
  
  polly.start:                                      ; preds = %polly.split_new_and_old
    br label %polly.loop_preheader
  
  polly.loop_exit:                                  ; preds = %polly.stmt.for.end
    br label %polly.exiting
  
  polly.exiting:                                    ; preds = %polly.loop_exit
    br label %polly.merge_new_and_old
  
  polly.loop_header:                                ; preds = %polly.stmt.for.end, %polly.loop_preheader
    %polly.indvar = phi i64 [ 0, %polly.loop_preheader ], [ %polly.indvar_next, %polly.stmt.for.end ]
    %3 = sub nsw i64 0, %polly.indvar
    %4 = add nsw i64 %3, 1023
    br label %polly.loop_preheader2
  
  polly.loop_exit3:                                 ; preds = %polly.stmt.for.body3
    br label %polly.stmt.for.end
  
  polly.stmt.for.end:                               ; preds = %polly.loop_exit3
    %scevgep10 = getelementptr [1024 x i32], [1024 x i32]* @B, i64 0, i64 %polly.indvar
    %_p_scalar_11 = load i32, i32* %scevgep10, align 4, !alias.scope !0, !noalias !2
    %scevgep12 = getelementptr [1024 x i32], [1024 x i32]* @A, i64 0, i64 %polly.indvar
    store i32 %_p_scalar_11, i32* %scevgep12, align 4, !alias.scope !3, !noalias !4
    %polly.indvar_next = add nsw i64 %polly.indvar, 1
    %polly.loop_cond = icmp sle i64 %polly.indvar_next, 1023
    br i1 %polly.loop_cond, label %polly.loop_header, label %polly.loop_exit
  
  polly.loop_preheader:                             ; preds = %polly.start
    br label %polly.loop_header
  
  polly.loop_header1:                               ; preds = %polly.stmt.for.body3, %polly.loop_preheader2
    %polly.indvar4 = phi i64 [ 0, %polly.loop_preheader2 ], [ %polly.indvar_next5, %polly.stmt.for.body3 ]
    br label %polly.stmt.for.body3
  
  polly.stmt.for.body3:                             ; preds = %polly.loop_header1
    %scevgep7 = getelementptr i32, i32* %scevgep, i64 %polly.indvar4
    %_p_scalar_ = load i32, i32* %scevgep7, align 4, !alias.scope !0, !noalias !2
    %_p_scalar_9 = load i32, i32* %scevgep8, align 4, !alias.scope !0, !noalias !2
    %p_add = add nsw i32 %_p_scalar_9, %_p_scalar_
    store i32 %p_add, i32* %scevgep8, align 4, !alias.scope !0, !noalias !2
    %polly.indvar_next5 = add nsw i64 %polly.indvar4, 1
    %polly.loop_cond6 = icmp sle i64 %polly.indvar_next5, %4
    br i1 %polly.loop_cond6, label %polly.loop_header1, label %polly.loop_exit3
  
  polly.loop_preheader2:                            ; preds = %polly.loop_header
    %scevgep = getelementptr [1024 x i32], [1024 x i32]* @B, i64 0, i64 %polly.indvar
    %scevgep8 = getelementptr [1024 x i32], [1024 x i32]* @B, i64 0, i64 %polly.indvar
    br label %polly.loop_header1
  }
  
  ; Function Attrs: nounwind readnone
  declare void @llvm.donothing() #1
  
  attributes #0 = { noinline nounwind uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "polly-optimized" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
  attributes #1 = { nounwind readnone }
  
  !0 = distinct !{!0, !1, !"polly.alias.scope.MemRef_B"}
  !1 = distinct !{!1, !"polly.alias.scope.domain"}
  !2 = !{!3}
  !3 = distinct !{!3, !1, !"polly.alias.scope.MemRef_A"}
  !4 = !{!0}


https://reviews.llvm.org/D33768





More information about the llvm-commits mailing list