Skip to content

Commit 34032b0

Browse files
committed
add llvm-mca example to LoopVectorization/utils
1 parent bbed0ce commit 34032b0

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

utils/generate_costs.jl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,3 +107,12 @@ let
107107
end
108108
end
109109

110+
let
111+
f, io = mktemp()
112+
W = Int(VectorizationBase.pick_vector_width(Float64))
113+
code_native(io, exp, (VecUnroll{1,W,Float64,Vec{W,Float64}},); debuginfo=:none)
114+
close(io)
115+
run(`llvm-mca -mcpu=$(Sys.CPU_NAME) -output-asm-variant=1 -bottleneck-analysis $f`)
116+
end
117+
118+

0 commit comments

Comments
 (0)