Skip to content

Instantly share code, notes, and snippets.

; ModuleID = 'chain_two_calls.cgu-0.rs'
source_filename = "chain_two_calls.cgu-0.rs"
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
%"8.unwind::libunwind::_Unwind_Exception" = type { i64, void (i32, %"8.unwind::libunwind::_Unwind_Exception"*)*, [6 x i64] }
%"8.unwind::libunwind::_Unwind_Context" = type {}
; Function Attrs: uwtable
define i64 @range_chain_default_fold(i64, i64, i64 (i64, i64)* nocapture) unnamed_addr #0 personality i32 (i32, i32, i64, %"8.unwind::libunwind::_Unwind_Exception"*, %"8.unwind::libunwind::_Unwind_Context"*)* @rust_eh_personality {
; ModuleID = 'chain_more_codegen.cgu-0.rs'
source_filename = "chain_more_codegen.cgu-0.rs"
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
%"8.unwind::libunwind::_Unwind_Exception" = type { i64, void (i32, %"8.unwind::libunwind::_Unwind_Exception"*)*, [6 x i64] }
%"8.unwind::libunwind::_Unwind_Context" = type {}
; Function Attrs: uwtable
define i64 @range_chain_default_fold(i64, i64, i64 (i64, i64)* nocapture) unnamed_addr #0 personality i32 (i32, i32, i64, %"8.unwind::libunwind::_Unwind_Exception"*, %"8.unwind::libunwind::_Unwind_Context"*)* @rust_eh_personality {
; ModuleID = 'chain_more_codegen.cgu-0.rs'
source_filename = "chain_more_codegen.cgu-0.rs"
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
%"8.unwind::libunwind::_Unwind_Exception" = type { i64, void (i32, %"8.unwind::libunwind::_Unwind_Exception"*)*, [6 x i64] }
%"8.unwind::libunwind::_Unwind_Context" = type {}
; Function Attrs: uwtable
define i64 @range_chain_default_fold(i64, i64, i64 (i64, i64)* nocapture) unnamed_addr #0 personality i32 (i32, i32, i64, %"8.unwind::libunwind::_Unwind_Exception"*, %"8.unwind::libunwind::_Unwind_Context"*)* @rust_eh_personality {
@bluss
bluss / extend.ll
Last active October 20, 2016 15:36
` rustc -Copt-level=3 --test extend.rs --emit=llvm-ir` using `rustc 1.14.0-nightly (16eeeac78 2016-10-18)` for just bench_chain_extend_ref from https://gist.github.com/bluss/baa98105d141cff3949dda1c1f2d8cce
; ModuleID = 'extend.cgu-0.rs'
source_filename = "extend.cgu-0.rs"
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
%str_slice = type { i8*, i64 }
%"12.test::Bencher" = type { i64, %"1.std::time::Duration", i64 }
%"1.std::time::Duration" = type { i64, i32 }
%"3.std::vec::Vec<u32>" = type { %"5.alloc::raw_vec::RawVec<u32>", i64 }
%"5.alloc::raw_vec::RawVec<u32>" = type { %"2.std::ptr::Unique<u32>", i64 }
Using rustc -Copt-level=3 --test extend.rs && ./extend --bench
name before-extend.log ns/iter after-extend.log ns/iter diff ns/iter diff %
bench_chain_collect 53,317 18,039 -35,278 -66.17%
bench_chain_extend_ref 18,105 17,945 -160 -0.88%
bench_chain_extend_value 22,425 18,016 -4,409 -19.66%
bench_map_fast 5,970 6,021 51 0.85%
bench_map_regular 14,242 6,088 -8,154 -57.25%
bench_range_map_collect 12,727 1,954 -10,773 -84.65%
bench_rev_1 14,132 2,574 -11,558 -81.79%
; ModuleID = 'bench1.cgu-0.rs'
source_filename = "bench1.cgu-0.rs"
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
%str_slice = type { i8*, i64 }
%"12.test::Bencher" = type { i64, %"1.std::time::Duration", i64 }
%"1.std::time::Duration" = type { i64, i32 }
%"15.ndarray::ArrayBase<ndarray::ViewRepr<&i32>, (usize, usize)>" = type { %"15.ndarray::ViewRepr<&i32>", i32*, { i64, i64 }, { i64, i64 } }
%"15.ndarray::ViewRepr<&i32>" = type { %"2.std::marker::PhantomData<&i32>" }
use std::ptr;
use std::mem;
struct Node<T> {
index: usize,
parent: *mut Node<T>,
children: [*mut Node<T>; 2],
value: T,
}
This file has been truncated, but you can view the full file.
fn <f64 as arbitrary::Arbitrary>::arbitrary(_1: &mut G) -> f64 {
let mut _0: f64; // return pointer
scope 1 {
let _2: &mut G; // "g" in scope 1 at src/arbitrary.rs:627:26: 627:27
scope 2 {
let _3: usize; // "s" in scope 2 at src/arbitrary.rs:628:13: 628:14
}
}
let mut _4: &G;
let mut _5: &mut G;
This file has been truncated, but you can view the full file.
; ModuleID = 'quickcheck.cgu-0.rs'
source_filename = "quickcheck.cgu-0.rs"
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
%str_slice = type { i8*, i64 }
%"3.std::string::String" = type { %"3.std::vec::Vec<u8>" }
%"3.std::vec::Vec<u8>" = type { %"5.alloc::raw_vec::RawVec<u8>", i64 }
%"5.alloc::raw_vec::RawVec<u8>" = type { %"2.std::ptr::Unique<u8>", i64 }
%"2.std::ptr::Unique<u8>" = type { %"2.core::nonzero::NonZero<*const u8>", %"2.std::marker::PhantomData<u8>" }
This file has been truncated, but you can view the full file.
; ModuleID = 'quickcheck.cgu-0.rs'
source_filename = "quickcheck.cgu-0.rs"
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
%str_slice = type { i8*, i64 }
%"3.std::string::String" = type { %"3.std::vec::Vec<u8>" }
%"3.std::vec::Vec<u8>" = type { %"5.alloc::raw_vec::RawVec<u8>", i64 }
%"5.alloc::raw_vec::RawVec<u8>" = type { %"2.std::ptr::Unique<u8>", i64 }
%"2.std::ptr::Unique<u8>" = type { %"2.core::nonzero::NonZero<*const u8>", %"2.std::marker::PhantomData<u8>" }