Skip to content

Instantly share code, notes, and snippets.

function to_mc(asm)
aname = tempname()
open(aname, "w") do io
write(io, asm)
write(io, '\n')
end
oname = tempname()
run(`as --64 $aname -o $oname`)
mname = tempname()
run(`objcopy -O binary $oname $mname`)
diff --git a/include/llvm/CodeGen/StackMaps.h b/include/llvm/CodeGen/StackMaps.h
index fdc1a91..3f81506 100644
--- a/include/llvm/CodeGen/StackMaps.h
+++ b/include/llvm/CodeGen/StackMaps.h
@@ -193,6 +193,7 @@ private:
typedef SmallVector<LiveOutReg, 8> LiveOutVec;
typedef MapVector<uint64_t, uint64_t> ConstantPool;
typedef MapVector<const MCSymbol *, uint64_t> FnStackSizeMap;
+ typedef std::map<const MCSymbol *, uint64_t> FnNumRecordMap;
@carnaval
carnaval / a.jl
Created September 11, 2015 11:43
julia> function f(x::Float64)
@iaca for i = 1:1000
x = x*x - 2*x
end
x
end
f (generic function with 2 methods)
julia> println(analyze(f, Tuple{Float64}))
Intel(R) Architecture Code Analyzer Version - 2.1
@carnaval
carnaval / aaaa
Created April 23, 2015 21:23
aaaaa
function F(N)
A = fill(1, N)
B = fill(1, N)
r = []
dt1 = @elapsed (for w in workers(); copy!(B, A); B[1]; end)
dt2 = @elapsed begin
for w in workers()
push!(r, remotecall(w, () -> A[1]))
end
@show map(fetch, r)
@carnaval
carnaval / gist:d8055856a2a25cfd7b97
Created September 14, 2014 09:03
bench 2aeaa59d
# master: 3b2269d8
# incgc: 2aeaa59d
# micro
test name old new % speedup % st. dev
-----------------------------------------------------------
fib 0.055 0.053 3.64% 3.64%
mandel 0.163 0.152 6.75% 4.91%
micro.mem 255.609 178.449 30.19% 0.00%
parse_int 0.216 0.172 20.37% 354.17%
test name old new % speedup % st. dev
-----------------------------------------------------------
* no write barrier
the only difference with master is the page allocation changes
binary_trees 27.173 27.596 -1.56% 20.65%
fannkuch 0.187 0.183 2.14% 0.53%
k_nucleotide 68.399 68.347 0.08% 0.75%
mandelbrot 4.373 4.39 -0.39% 0.32%