Created
January 4, 2017 00:08
-
-
Save KristofferC/1cf9e09d97289b521f494c9c68958043 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
julia> @code_llvm perf_sumeach_view(A) | |
define double @julia_perf_sumeach_view_62096(%LinSpace*) #0 !dbg !5 { | |
top: | |
%1 = getelementptr %LinSpace, %LinSpace* %0, i64 0, i32 2 | |
%2 = load double, double* %1, align 8 | |
%3 = fadd double %2, -1.000000e+00 | |
%4 = bitcast double %3 to i64 | |
%5 = icmp sgt i64 %4, -1 | |
%6 = fadd double %2, 1.000000e+00 | |
%7 = select i1 %5, double %2, double %6 | |
%8 = call i64 @jlsys_convert_52679(%jl_value_t* inttoptr (i64 139759635777136 to %jl_value_t*), double %7) | |
%9 = icmp slt i64 %8, 0 | |
%10 = select i1 %9, i64 0, i64 %8 | |
%11 = icmp slt i64 %10, 1 | |
br i1 %11, label %L28.us.us.preheader, label %top.split.split.us | |
L28.us.us.preheader: ; preds = %top | |
br label %L28.us.us | |
L28.us.us: ; preds = %L28.us.us.preheader, %if.us.us | |
%"#temp#.0.us.us" = phi i64 [ %13, %if.us.us ], [ 0, %L28.us.us.preheader ] | |
%12 = icmp eq i64 %"#temp#.0.us.us", 1 | |
br i1 %12, label %L117.loopexit, label %if.us.us | |
if.us.us: ; preds = %L28.us.us | |
%13 = add nuw nsw i64 %"#temp#.0.us.us", 1 | |
br label %L28.us.us | |
top.split.split.us: ; preds = %top | |
%.sroa.0.0..sroa_idx = getelementptr inbounds %LinSpace, %LinSpace* %0, i64 0, i32 0 | |
%.sroa.2.0..sroa_idx10 = getelementptr inbounds %LinSpace, %LinSpace* %0, i64 0, i32 1 | |
%.sroa.4.0..sroa_idx12 = getelementptr inbounds %LinSpace, %LinSpace* %0, i64 0, i32 3 | |
br label %L28.outer.L28.outer.split_crit_edge.us51 | |
if3.lr.ph.us30: ; preds = %L28.outer.L28.outer.split_crit_edge.us51 | |
%14 = add i64 %"#temp#.0.ph.us23", 1 | |
br label %if3.us31 | |
if3.us31: ; preds = %if3.us31, %if3.lr.ph.us30 | |
%15 = phi double [ %32, %if3.lr.ph.us30 ], [ %.sroa.3.0.copyload.us36, %if3.us31 ] | |
%s.115.us32 = phi double [ %s.0.ph.us24, %if3.lr.ph.us30 ], [ %30, %if3.us31 ] | |
%"i#289.014.us33" = phi i64 [ 0, %if3.lr.ph.us30 ], [ %16, %if3.us31 ] | |
%16 = add nuw nsw i64 %"i#289.014.us33", 1 | |
%17 = fadd double %15, -1.000000e+00 | |
%18 = bitcast double %17 to i64 | |
%19 = icmp sgt i64 %18, -1 | |
%20 = fadd double %15, 1.000000e+00 | |
%21 = select i1 %19, double %15, double %20 | |
%22 = call i64 @jlsys_convert_52679(%jl_value_t* inttoptr (i64 139759635777136 to %jl_value_t*), double %21) | |
%.sroa.0.0.copyload.us34 = load double, double* %.sroa.0.0..sroa_idx, align 1 | |
%.sroa.2.0.copyload.us35 = load double, double* %.sroa.2.0..sroa_idx10, align 1 | |
%.sroa.3.0.copyload.us36 = load double, double* %1, align 1 | |
%.sroa.4.0.copyload.us37 = load double, double* %.sroa.4.0..sroa_idx12, align 1 | |
%23 = sitofp i64 %16 to double | |
%24 = fsub double %.sroa.3.0.copyload.us36, %23 | |
%25 = fmul double %.sroa.0.0.copyload.us34, %24 | |
%26 = sitofp i64 %"i#289.014.us33" to double | |
%27 = fmul double %26, %.sroa.2.0.copyload.us35 | |
%28 = fadd double %27, %25 | |
%29 = fdiv double %28, %.sroa.4.0.copyload.us37 | |
%30 = fadd double %s.115.us32, %29 | |
%31 = icmp slt i64 %16, %10 | |
br i1 %31, label %if3.us31, label %L28.outer.L28.outer.split_crit_edge.us51.loopexit | |
L28.outer.L28.outer.split_crit_edge.us51.loopexit: ; preds = %if3.us31 | |
br label %L28.outer.L28.outer.split_crit_edge.us51 | |
L28.outer.L28.outer.split_crit_edge.us51: ; preds = %L28.outer.L28.outer.split_crit_edge.us51.loopexit, %top.split.split.us | |
%32 = phi double [ %2, %top.split.split.us ], [ %.sroa.3.0.copyload.us36, %L28.outer.L28.outer.split_crit_edge.us51.loopexit ] | |
%"#temp#.0.ph.us23" = phi i64 [ 0, %top.split.split.us ], [ %14, %L28.outer.L28.outer.split_crit_edge.us51.loopexit ] | |
%s.0.ph.us24 = phi double [ 0.000000e+00, %top.split.split.us ], [ %30, %L28.outer.L28.outer.split_crit_edge.us51.loopexit ] | |
%33 = icmp eq i64 %"#temp#.0.ph.us23", 1 | |
br i1 %33, label %L117.loopexit56, label %if3.lr.ph.us30 | |
L28.outer.L28.outer.split_crit_edge: ; preds = %L28.outer.L28.outer.split_crit_edge | |
br label %L28.outer.L28.outer.split_crit_edge | |
L117.loopexit: ; preds = %L28.us.us | |
br label %L117 | |
L117.loopexit56: ; preds = %L28.outer.L28.outer.split_crit_edge.us51 | |
br label %L117 | |
L117: ; preds = %L117.loopexit56, %L117.loopexit | |
%s.0.ph.lcssa = phi double [ 0.000000e+00, %L117.loopexit ], [ %s.0.ph.us24, %L117.loopexit56 ] | |
ret double %s.0.ph.lcssa | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
julia> @code_llvm perf_sumeach_view(A) | |
define double @julia_perf_sumeach_view_62006(%LinSpace*) #0 !dbg !5 { | |
top: | |
%1 = getelementptr %LinSpace, %LinSpace* %0, i64 0, i32 2 | |
%2 = load double, double* %1, align 8 | |
%3 = fadd double %2, -1.000000e+00 | |
%4 = bitcast double %3 to i64 | |
%5 = icmp sgt i64 %4, -1 | |
%6 = fadd double %2, 1.000000e+00 | |
%7 = select i1 %5, double %2, double %6 | |
%8 = call i64 @jlsys_convert_53114(%jl_value_t* inttoptr (i64 140654140507760 to %jl_value_t*), double %7) | |
%9 = icmp slt i64 %8, 0 | |
%10 = select i1 %9, i64 0, i64 %8 | |
%11 = icmp slt i64 %10, 1 | |
br i1 %11, label %L28.us.us.preheader, label %top.split.split.us | |
L28.us.us.preheader: ; preds = %top | |
br label %L28.us.us | |
L28.us.us: ; preds = %L28.us.us.preheader, %if.us.us | |
%"#temp#.0.us.us" = phi i64 [ %13, %if.us.us ], [ 0, %L28.us.us.preheader ] | |
%12 = icmp eq i64 %"#temp#.0.us.us", 1 | |
br i1 %12, label %L104.loopexit, label %if.us.us | |
if.us.us: ; preds = %L28.us.us | |
%13 = add nuw nsw i64 %"#temp#.0.us.us", 1 | |
br label %L28.us.us | |
top.split.split.us: ; preds = %top | |
%.sroa.0.0..sroa_idx = getelementptr inbounds %LinSpace, %LinSpace* %0, i64 0, i32 0 | |
%.sroa.2.0..sroa_idx10 = getelementptr inbounds %LinSpace, %LinSpace* %0, i64 0, i32 1 | |
%.sroa.4.0..sroa_idx12 = getelementptr inbounds %LinSpace, %LinSpace* %0, i64 0, i32 3 | |
br label %L28.outer.L28.outer.split_crit_edge.us51 | |
if3.lr.ph.us30: ; preds = %L28.outer.L28.outer.split_crit_edge.us51 | |
%14 = add i64 %"#temp#.0.ph.us23", 1 | |
%.sroa.0.0.copyload.us31 = load double, double* %.sroa.0.0..sroa_idx, align 1 | |
%.sroa.2.0.copyload.us32 = load double, double* %.sroa.2.0..sroa_idx10, align 1 | |
%.sroa.3.0.copyload.us33 = load double, double* %1, align 1 | |
%.sroa.4.0.copyload.us34 = load double, double* %.sroa.4.0..sroa_idx12, align 1 | |
br label %if3.us35 | |
if3.us35: ; preds = %if3.us35, %if3.lr.ph.us30 | |
%s.115.us36 = phi double [ %s.0.ph.us24, %if3.lr.ph.us30 ], [ %23, %if3.us35 ] | |
%"i#289.014.us37" = phi i64 [ 0, %if3.lr.ph.us30 ], [ %15, %if3.us35 ] | |
%15 = add nuw nsw i64 %"i#289.014.us37", 1 | |
%16 = sitofp i64 %15 to double | |
%17 = fsub double %.sroa.3.0.copyload.us33, %16 | |
%18 = fmul double %.sroa.0.0.copyload.us31, %17 | |
%19 = sitofp i64 %"i#289.014.us37" to double | |
%20 = fmul double %19, %.sroa.2.0.copyload.us32 | |
%21 = fadd double %20, %18 | |
%22 = fdiv double %21, %.sroa.4.0.copyload.us34 | |
%23 = fadd double %s.115.us36, %22 | |
%24 = icmp slt i64 %15, %10 | |
br i1 %24, label %if3.us35, label %L28.outer.L28.outer.split_crit_edge.us51.loopexit | |
L28.outer.L28.outer.split_crit_edge.us51.loopexit: ; preds = %if3.us35 | |
br label %L28.outer.L28.outer.split_crit_edge.us51 | |
L28.outer.L28.outer.split_crit_edge.us51: ; preds = %L28.outer.L28.outer.split_crit_edge.us51.loopexit, %top.split.split.us | |
%"#temp#.0.ph.us23" = phi i64 [ 0, %top.split.split.us ], [ %14, %L28.outer.L28.outer.split_crit_edge.us51.loopexit ] | |
%s.0.ph.us24 = phi double [ 0.000000e+00, %top.split.split.us ], [ %23, %L28.outer.L28.outer.split_crit_edge.us51.loopexit ] | |
%25 = icmp eq i64 %"#temp#.0.ph.us23", 1 | |
br i1 %25, label %L104.loopexit56, label %if3.lr.ph.us30 | |
L28.outer.L28.outer.split_crit_edge: ; preds = %L28.outer.L28.outer.split_crit_edge | |
br label %L28.outer.L28.outer.split_crit_edge | |
L104.loopexit: ; preds = %L28.us.us | |
br label %L104 | |
L104.loopexit56: ; preds = %L28.outer.L28.outer.split_crit_edge.us51 | |
br label %L104 | |
L104: ; preds = %L104.loopexit56, %L104.loopexit | |
%s.0.ph.lcssa = phi double [ 0.000000e+00, %L104.loopexit ], [ %s.0.ph.us24, %L104.loopexit56 ] | |
ret double %s.0.ph.lcssa | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment