-
-
Notifications
You must be signed in to change notification settings - Fork 14
/
_llvm-mca
156 lines (148 loc) · 8.17 KB
/
_llvm-mca
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
#compdef llvm-mca
# -----------------------------------------------------------------------------
# Copyright 2018, The zsh-completions Authors.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this
# list of conditions and the following disclaimer.
#
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
#
# * Neither the name of que nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
# -----------------------------------------------------------------------------
function _llvm-mca() {
local context curcontext=$curcontext state line expl ret=1
declare -A opt_args
local -a _llvm_generic_options
_llvm_generic_options=(
{-h,--help}"[Display available options]"
"--help-hidden[Display all available options]"
"--help-list[Display list of available options]"
"--help-list-hidden[Display list of all available options]"
"--print-all-options[Print all option values after command line parsing]"
"--print-options[Print non-default options after command line parsing]"
"--version[Display the version of this program]"
)
_arguments -C \
"--decoder-throughput=[Maximum throughput from the decoders (instructions per cycle)]:maximum throughput" \
"--dispatch=[Override the processor dispatch width]:num of process" \
"--instruction-tables[Print instruction tables]" \
"--iterations=[Number of iterations to run]:num of iterations" \
"--json[Print the output in json format]" \
"--lqueue=[Size of the load queue]:load queue size" \
"--march=[Target architecture. See -version for available targets]:arch:(x86 x86-64)" \
"--mattr=[Additional target features.]:additional target" \
"--mcpu=[Target a specific cpu type (-mcpu=help for details)]:target cpu type" \
"--micro-op-queue-size=[Number of entries in the micro-op queue]:num of queue" \
"--mtriple=[Target triple. See -version for available targets]:target triple" \
"--noalias[If set, assume that loads and stores do not alias]" \
"-o=[Output filename]:output:_files" \
"--output-asm-variant=[Syntax variant to use for output printing]" \
"--print-imm-hex[Prefer hex format when printing immediate values]" \
"--register-file-size=[Maximum number of physical registers which can be used for register mappings]:register-file-size" \
"--squeue=[Size of the store queue]:store queue size" \
"--all-stats[Print all hardware statistics]" \
"--all-views[Print all views including hardware statistics]" \
"--bottleneck-analysis[Enable bottleneck analysis (disabled by default)]" \
"--dispatch-stats[Print dispatch statistics]" \
"--instruction-info[Print the instruction info view (enabled by default)]" \
"--register-file-stats[Print register file statistics]" \
"--resource-pressure[Print the resource pressure view (enabled by default)]" \
"--retire-stats[Print retire control unit statistics]" \
"--scheduler-stats[Print scheduler statistics]" \
"--show-encoding[Print encoding information in the instruction info view]" \
"--summary-view[Print summary view (enabled by default)]" \
"--timeline[Print the timeline view]" \
"--timeline-max-cycles=[Maximum number of cycles in the timeline view. Defaults to 80 cycles]:num of max timeline view" \
"--timeline-max-iterations=[Maximum number of iterations to print in timeline view]:num of max print in timeline view" \
$_llvm_generic_options \
"*:input file:_files" \
&& ret=0
return ret
}
_llvm-mca "$*"
# -----------------------------------------------------------------------------
#
# OVERVIEW: llvm machine code performance analyzer.
#
# USAGE: llvm-mca [options] <input file>
#
# OPTIONS:
#
# Color Options:
#
# This option category has no options.
#
# General options:
#
# This option category has no options.
#
# Generic Options:
#
# -h - Alias for --help
# --help - Display available options (--help-hidden for more)
# --help-hidden - Display all available options
# --help-list - Display list of available options (--help-list-hidden for more)
# --help-list-hidden - Display list of all available options
# --print-all-options - Print all option values after command line parsing
# --print-options - Print non-default options after command line parsing
# --version - Display the version of this program
#
# Tool Options:
#
# --decoder-throughput=<uint> - Maximum throughput from the decoders (instructions per cycle)
# --dispatch=<uint> - Override the processor dispatch width
# --instruction-tables - Print instruction tables
# --iterations=<uint> - Number of iterations to run
# --json - Print the output in json format
# --lqueue=<uint> - Size of the load queue
# --march=<string> - Target architecture. See -version for available targets
# --mattr=<string> - Additional target features.
# --mcpu=<cpu-name> - Target a specific cpu type (-mcpu=help for details)
# --micro-op-queue-size=<uint> - Number of entries in the micro-op queue
# --mtriple=<string> - Target triple. See -version for available targets
# --noalias - If set, assume that loads and stores do not alias
# -o=<filename> - Output filename
# --output-asm-variant=<int> - Syntax variant to use for output printing
# --print-imm-hex - Prefer hex format when printing immediate values
# --register-file-size=<uint> - Maximum number of physical registers which can be used for register mappings
# --squeue=<uint> - Size of the store queue
#
# View Options:
#
# --all-stats - Print all hardware statistics
# --all-views - Print all views including hardware statistics
# --bottleneck-analysis - Enable bottleneck analysis (disabled by default)
# --dispatch-stats - Print dispatch statistics
# --instruction-info - Print the instruction info view (enabled by default)
# --register-file-stats - Print register file statistics
# --resource-pressure - Print the resource pressure view (enabled by default)
# --retire-stats - Print retire control unit statistics
# --scheduler-stats - Print scheduler statistics
# --show-encoding - Print encoding information in the instruction info view
# --summary-view - Print summary view (enabled by default)
# --timeline - Print the timeline view
# --timeline-max-cycles=<uint> - Maximum number of cycles in the timeline view. Defaults to 80 cycles
# --timeline-max-iterations=<uint> - Maximum number of iterations to print in timeline view
#
# -----------------------------------------------------------------------------
# vim:ft=zsh:et:sts=2:sw=2