Skip to content

Commit fb8eacd

Browse files
SC llvm teamgokulbmishra
authored andcommitted
Merge llvm/main into amd-debug
1 parent a1ca690 commit fb8eacd

File tree

17 files changed

+260
-17
lines changed

17 files changed

+260
-17
lines changed

clang/include/clang/Basic/Builtins.td

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5006,6 +5006,12 @@ def HLSLResourceGetStride : LangBuiltin<"HLSL_LANG"> {
50065006
let Prototype = "void(__hlsl_resource_t, uint32_t&)";
50075007
}
50085008

5009+
def HLSLResourceNonUniformIndex : LangBuiltin<"HLSL_LANG"> {
5010+
let Spellings = ["__builtin_hlsl_resource_nonuniformindex"];
5011+
let Attributes = [NoThrow];
5012+
let Prototype = "uint32_t(uint32_t)";
5013+
}
5014+
50095015
def HLSLAll : LangBuiltin<"HLSL_LANG"> {
50105016
let Spellings = ["__builtin_hlsl_all"];
50115017
let Attributes = [NoThrow, Const];

clang/lib/CIR/CodeGen/CIRGenExprScalar.cpp

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2298,14 +2298,20 @@ mlir::Value ScalarExprEmitter::VisitRealImag(const UnaryOperator *e,
22982298
}
22992299

23002300
if (e->getOpcode() == UO_Real) {
2301+
<<<<<<< HEAD
23012302
mlir::Value operand = promotionTy.isNull()
23022303
? Visit(op)
23032304
: cgf.emitPromotedScalarExpr(op, promotionTy);
23042305
return builder.createComplexReal(loc, operand);
2306+
=======
2307+
return promotionTy.isNull() ? Visit(op)
2308+
: cgf.emitPromotedScalarExpr(op, promotionTy);
2309+
>>>>>>> c9042b8fa9e7 (Merge llvm/main into amd-debug)
23052310
}
23062311

23072312
// __imag on a scalar returns zero. Emit the subexpr to ensure side
23082313
// effects are evaluated, but not the actual value.
2314+
<<<<<<< HEAD
23092315
mlir::Value operand;
23102316
if (op->isGLValue()) {
23112317
operand = cgf.emitLValue(op).getPointer();
@@ -2316,6 +2322,18 @@ mlir::Value ScalarExprEmitter::VisitRealImag(const UnaryOperator *e,
23162322
operand = cgf.emitScalarExpr(op);
23172323
}
23182324
return builder.createComplexImag(loc, operand);
2325+
=======
2326+
if (op->isGLValue())
2327+
cgf.emitLValue(op);
2328+
else if (!promotionTy.isNull())
2329+
cgf.emitPromotedScalarExpr(op, promotionTy);
2330+
else
2331+
cgf.emitScalarExpr(op);
2332+
2333+
mlir::Type valueTy =
2334+
cgf.convertType(promotionTy.isNull() ? e->getType() : promotionTy);
2335+
return builder.getNullValue(valueTy, loc);
2336+
>>>>>>> c9042b8fa9e7 (Merge llvm/main into amd-debug)
23192337
}
23202338

23212339
/// Return the size or alignment of the type of argument of the sizeof

clang/lib/CodeGen/CGHLSLBuiltins.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -475,6 +475,7 @@ Value *CodeGenFunction::EmitHLSLBuiltinExpr(unsigned BuiltinID,
475475
SmallVector<Value *> Args{OrderID, SpaceOp, RangeOp, IndexOp, Name};
476476
return Builder.CreateIntrinsic(HandleTy, IntrinsicID, Args);
477477
}
478+
<<<<<<< HEAD
478479
case Builtin::BI__builtin_hlsl_resource_counterhandlefromimplicitbinding: {
479480
Value *MainHandle = EmitScalarExpr(E->getArg(0));
480481
if (!CGM.getTriple().isSPIRV())
@@ -488,13 +489,16 @@ Value *CodeGenFunction::EmitHLSLBuiltinExpr(unsigned BuiltinID,
488489
SmallVector<Value *> Args{MainHandle, OrderID, SpaceOp};
489490
return Builder.CreateIntrinsic(HandleTy, IntrinsicID, Args);
490491
}
492+
=======
493+
>>>>>>> c9042b8fa9e7 (Merge llvm/main into amd-debug)
491494
case Builtin::BI__builtin_hlsl_resource_nonuniformindex: {
492495
Value *IndexOp = EmitScalarExpr(E->getArg(0));
493496
llvm::Type *RetTy = ConvertType(E->getType());
494497
return Builder.CreateIntrinsic(
495498
RetTy, CGM.getHLSLRuntime().getNonUniformResourceIndexIntrinsic(),
496499
ArrayRef<Value *>{IndexOp});
497500
}
501+
<<<<<<< HEAD
498502
case Builtin::BI__builtin_hlsl_resource_getdimensions_x: {
499503
Value *Handle = EmitScalarExpr(E->getArg(0));
500504
LValue Dim = EmitLValue(E->getArg(1));
@@ -508,6 +512,8 @@ Value *CodeGenFunction::EmitHLSLBuiltinExpr(unsigned BuiltinID,
508512
LValue Stride = EmitLValue(E->getArg(1));
509513
return emitBufferStride(this, E->getArg(0), Stride);
510514
}
515+
=======
516+
>>>>>>> c9042b8fa9e7 (Merge llvm/main into amd-debug)
511517
case Builtin::BI__builtin_hlsl_all: {
512518
Value *Op0 = EmitScalarExpr(E->getArg(0));
513519
return Builder.CreateIntrinsic(

clang/test/CIR/CodeGen/complex.cpp

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1094,6 +1094,7 @@ void imag_on_non_glvalue() {
10941094
// OGCG: %[[A_IMAG:.*]] = load float, ptr %[[A_IMAG_PTR]], align 4
10951095
// OGCG: store float %[[A_IMAG]], ptr %[[B_ADDR]], align 4
10961096

1097+
<<<<<<< HEAD
10971098
void atomic_complex_type() {
10981099
_Atomic(float _Complex) a;
10991100
float _Complex b = __c11_atomic_load(&a, __ATOMIC_RELAXED);
@@ -1132,6 +1133,8 @@ void atomic_complex_type() {
11321133
// OGCG: store float %[[ATOMIC_TMP_REAL]], ptr %[[B_REAL_PTR]], align 4
11331134
// OGCG: store float %[[ATOMIC_TMP_IMAG]], ptr %[[B_IMAG_PTR]], align 4
11341135

1136+
=======
1137+
>>>>>>> c9042b8fa9e7 (Merge llvm/main into amd-debug)
11351138
void real_on_scalar_glvalue() {
11361139
float a;
11371140
float b = __real__ a;
@@ -1140,8 +1143,12 @@ void real_on_scalar_glvalue() {
11401143
// CIR: %[[A_ADDR:.*]] = cir.alloca !cir.float, !cir.ptr<!cir.float>, ["a"]
11411144
// CIR: %[[B_ADDR:.*]] = cir.alloca !cir.float, !cir.ptr<!cir.float>, ["b", init]
11421145
// CIR: %[[TMP_A:.*]] = cir.load{{.*}} %[[A_ADDR]] : !cir.ptr<!cir.float>, !cir.float
1146+
<<<<<<< HEAD
11431147
// CIR: %[[A_REAL:.*]] = cir.complex.real %[[TMP_A]] : !cir.float -> !cir.float
11441148
// CIR: cir.store{{.*}} %[[A_REAL]], %[[B_ADDR]] : !cir.float, !cir.ptr<!cir.float>
1149+
=======
1150+
// CIR: cir.store{{.*}} %[[TMP_A]], %[[B_ADDR]] : !cir.float, !cir.ptr<!cir.float>
1151+
>>>>>>> c9042b8fa9e7 (Merge llvm/main into amd-debug)
11451152

11461153
// LLVM: %[[A_ADDR:.*]] = alloca float, i64 1, align 4
11471154
// LLVM: %[[B_ADDR:.*]] = alloca float, i64 1, align 4
@@ -1160,9 +1167,14 @@ void imag_on_scalar_glvalue() {
11601167

11611168
// CIR: %[[A_ADDR:.*]] = cir.alloca !cir.float, !cir.ptr<!cir.float>, ["a"]
11621169
// CIR: %[[B_ADDR:.*]] = cir.alloca !cir.float, !cir.ptr<!cir.float>, ["b", init]
1170+
<<<<<<< HEAD
11631171
// CIR: %[[TMP_A:.*]] = cir.load %[[A_ADDR]] : !cir.ptr<!cir.float>, !cir.float
11641172
// CIR: %[[A_IMAG:.*]] = cir.complex.imag %[[TMP_A]] : !cir.float -> !cir.float
11651173
// CIR: cir.store{{.*}} %[[A_IMAG]], %[[B_ADDR]] : !cir.float, !cir.ptr<!cir.float>
1174+
=======
1175+
// CIR: %[[CONST_ZERO:.*]] = cir.const #cir.fp<0.000000e+00> : !cir.float
1176+
// CIR: cir.store{{.*}} %[[CONST_ZERO]], %[[B_ADDR]] : !cir.float, !cir.ptr<!cir.float>
1177+
>>>>>>> c9042b8fa9e7 (Merge llvm/main into amd-debug)
11661178

11671179
// LLVM: %[[A_ADDR:.*]] = alloca float, i64 1, align 4
11681180
// LLVM: %[[B_ADDR:.*]] = alloca float, i64 1, align 4
@@ -1180,9 +1192,14 @@ void real_on_scalar_with_type_promotion() {
11801192
// CIR: %[[A_ADDR:.*]] = cir.alloca !cir.f16, !cir.ptr<!cir.f16>, ["a"]
11811193
// CIR: %[[B_ADDR:.*]] = cir.alloca !cir.f16, !cir.ptr<!cir.f16>, ["b", init]
11821194
// CIR: %[[TMP_A:.*]] = cir.load{{.*}} %[[A_ADDR]] : !cir.ptr<!cir.f16>, !cir.f16
1195+
<<<<<<< HEAD
11831196
// CIR: %[[TMP_A_F32:.*]] = cir.cast floating %[[TMP_A]] : !cir.f16 -> !cir.float
11841197
// CIR: %[[A_REAL:.*]] = cir.complex.real %[[TMP_A_F32]] : !cir.float -> !cir.float
11851198
// CIR: %[[TMP_A_F16:.*]] = cir.cast floating %[[A_REAL]] : !cir.float -> !cir.f16
1199+
=======
1200+
// CIR: %[[TMP_A_F32:.*]] = cir.cast(floating, %[[TMP_A]] : !cir.f16), !cir.float
1201+
// CIR: %[[TMP_A_F16:.*]] = cir.cast(floating, %[[TMP_A_F32]] : !cir.float), !cir.f16
1202+
>>>>>>> c9042b8fa9e7 (Merge llvm/main into amd-debug)
11861203
// CIR: cir.store{{.*}} %[[TMP_A_F16]], %[[B_ADDR]] : !cir.f16, !cir.ptr<!cir.f16>
11871204

11881205
// LLVM: %[[A_ADDR:.*]] = alloca half, i64 1, align 2
@@ -1206,10 +1223,16 @@ void imag_on_scalar_with_type_promotion() {
12061223

12071224
// CIR: %[[A_ADDR:.*]] = cir.alloca !cir.f16, !cir.ptr<!cir.f16>, ["a"]
12081225
// CIR: %[[B_ADDR:.*]] = cir.alloca !cir.f16, !cir.ptr<!cir.f16>, ["b", init]
1226+
<<<<<<< HEAD
12091227
// CIR: %[[TMP_A:.*]] = cir.load %[[A_ADDR]] : !cir.ptr<!cir.f16>, !cir.f16
12101228
// CIR: %[[A_IMAG:.*]] = cir.complex.imag %[[TMP_A]] : !cir.f16 -> !cir.f16
12111229
// CIR: %[[A_IMAG_F16:.*]] = cir.cast floating %[[A_IMAG]] : !cir.f16 -> !cir.f16
12121230
// CIR: cir.store{{.*}} %[[A_IMAG_F16]], %[[B_ADDR]] : !cir.f16, !cir.ptr<!cir.f16>
1231+
=======
1232+
// CIR: %[[CONST_ZERO:.*]] = cir.const #cir.fp<0.000000e+00> : !cir.float
1233+
// CIR: %[[CONST_ZERO_F16:.*]] = cir.cast(floating, %[[CONST_ZERO]] : !cir.float), !cir.f16
1234+
// CIR: cir.store{{.*}} %[[CONST_ZERO_F16]], %[[B_ADDR]] : !cir.f16, !cir.ptr<!cir.f16>
1235+
>>>>>>> c9042b8fa9e7 (Merge llvm/main into amd-debug)
12131236

12141237
// LLVM: %[[A_ADDR:.*]] = alloca half, i64 1, align 2
12151238
// LLVM: %[[B_ADDR:.*]] = alloca half, i64 1, align 2
@@ -1227,8 +1250,13 @@ void imag_on_const_scalar() {
12271250
// CIR: %[[A_ADDR:.*]] = cir.alloca !cir.float, !cir.ptr<!cir.float>, ["a"]
12281251
// CIR: %[[B_ADDR:.*]] = cir.alloca !cir.float, !cir.ptr<!cir.float>, ["b", init]
12291252
// CIR: %[[CONST_ONE:.*]] = cir.const #cir.fp<1.000000e+00> : !cir.float
1253+
<<<<<<< HEAD
12301254
// CIR: %[[CONST_IMAG:.*]] = cir.complex.imag %[[CONST_ONE]] : !cir.float -> !cir.float
12311255
// CIR: cir.store{{.*}} %[[CONST_IMAG]], %[[B_ADDR]] : !cir.float, !cir.ptr<!cir.float>
1256+
=======
1257+
// CIR: %[[CONST_ZERO:.*]] = cir.const #cir.fp<0.000000e+00> : !cir.float
1258+
// CIR: cir.store{{.*}} %[[CONST_ZERO]], %[[B_ADDR]] : !cir.float, !cir.ptr<!cir.float>
1259+
>>>>>>> c9042b8fa9e7 (Merge llvm/main into amd-debug)
12321260

12331261
// LLVM: %[[A_ADDR:.*]] = alloca float, i64 1, align 4
12341262
// LLVM: %[[B_ADDR:.*]] = alloca float, i64 1, align 4
@@ -1237,6 +1265,7 @@ void imag_on_const_scalar() {
12371265
// OGCG: %[[A_ADDR:.*]] = alloca float, align 4
12381266
// OGCG: %[[B_ADDR:.*]] = alloca float, align 4
12391267
// OGCG: store float 0.000000e+00, ptr %[[B_ADDR]], align 4
1268+
<<<<<<< HEAD
12401269

12411270
void real_on_scalar_from_real_with_type_promotion() {
12421271
_Float16 _Complex a;
@@ -1677,3 +1706,5 @@ void load_store_volatile_2() {
16771706
// OGCG: %[[DV_IMAG_PTR:.*]] = getelementptr inbounds nuw { i32, i32 }, ptr %[[DV_ADDR]], i32 0, i32 1
16781707
// OGCG: store volatile i32 %[[D_REAL]], ptr %[[DV_REAL_PTR]], align 4
16791708
// OGCG: store volatile i32 %[[D_IMAG]], ptr %[[DV_IMAG_PTR]], align 4
1709+
=======
1710+
>>>>>>> c9042b8fa9e7 (Merge llvm/main into amd-debug)

clang/test/Preprocessor/print-header-json.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@
2222
#include "system2.h"
2323

2424
// RUN: rm %t.txt
25+
<<<<<<< HEAD
2526
// RUN: rm -rf %t
27+
=======
28+
>>>>>>> c9042b8fa9e7 (Merge llvm/main into amd-debug)
2629
// RUN: env CC_PRINT_HEADERS_FORMAT=json CC_PRINT_HEADERS_FILTERING=direct-per-file CC_PRINT_HEADERS_FILE=%t.txt %clang -fsyntax-only -I %S/Inputs/print-header-json -isystem %S/Inputs/print-header-json/system -fmodules -fimplicit-module-maps -fmodules-cache-path=%t %s -o /dev/null
2730
// RUN: cat %t.txt | FileCheck %s --check-prefix=SUPPORTED_PERFILE_MODULES
2831

libcxx/utils/compare-benchmarks

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ def parse_lnt(lines, aggregate=statistics.median):
4747
if benchmark not in results:
4848
results[benchmark] = {'benchmark': benchmark}
4949

50+
<<<<<<< HEAD
5051
entry = results[benchmark]
5152
if metric not in entry:
5253
entry[metric] = []
@@ -60,9 +61,27 @@ def parse_lnt(lines, aggregate=statistics.median):
6061
return list(results.values())
6162

6263
def plain_text_comparison(data, metric, baseline_name=None, candidate_name=None):
64+
=======
65+
def plain_text_comparison(benchmarks, baseline, candidate, baseline_name=None, candidate_name=None):
66+
"""
67+
Create a tabulated comparison of the baseline and the candidate.
68+
"""
69+
headers = ['Benchmark', baseline_name, candidate_name, 'Difference', '% Difference']
70+
fmt = (None, '.2f', '.2f', '.2f', '.2f')
71+
table = []
72+
for (bm, base, cand) in zip(benchmarks, baseline, candidate):
73+
diff = (cand - base) if base and cand else None
74+
percent = 100 * (diff / base) if base and cand else None
75+
row = [bm, base, cand, diff, percent]
76+
table.append(row)
77+
return tabulate.tabulate(table, headers=headers, floatfmt=fmt, numalign='right')
78+
79+
def create_chart(benchmarks, baseline, candidate, subtitle=None, baseline_name=None, candidate_name=None):
80+
>>>>>>> c9042b8fa9e7 (Merge llvm/main into amd-debug)
6381
"""
6482
Create a tabulated comparison of the baseline and the candidate for the given metric.
6583
"""
84+
<<<<<<< HEAD
6685
data = data.replace(numpy.nan, None) # avoid NaNs in tabulate output
6786
headers = ['Benchmark', baseline_name, candidate_name, 'Difference', '% Difference']
6887
fmt = (None, '.2f', '.2f', '.2f', '.2%')
@@ -84,6 +103,16 @@ def create_chart(data, metric, subtitle=None, series_names=None):
84103
title = ' vs '.join(series_names)
85104
figure = plotly.express.bar(data, title=title, subtitle=subtitle, x='benchmark', y=series_names, barmode='group')
86105
figure.update_layout(xaxis_title='', yaxis_title='', legend_title='')
106+
=======
107+
figure = plotly.graph_objects.Figure(layout={
108+
'title': {
109+
'text': f'{baseline_name} vs {candidate_name}',
110+
'subtitle': {'text': subtitle}
111+
}
112+
})
113+
figure.add_trace(plotly.graph_objects.Bar(x=benchmarks, y=baseline, name=baseline_name))
114+
figure.add_trace(plotly.graph_objects.Bar(x=benchmarks, y=candidate, name=candidate_name))
115+
>>>>>>> c9042b8fa9e7 (Merge llvm/main into amd-debug)
87116
return figure
88117

89118
def main(argv):
@@ -119,14 +148,22 @@ def main(argv):
119148
parser.add_argument('--open', action='store_true',
120149
help='Whether to automatically open the generated HTML file when finished. This option only makes sense '
121150
'when the output format is `chart`.')
151+
<<<<<<< HEAD
122152
parser.add_argument('--series-names', type=str, required=False,
123153
help='Optional comma-delimited list of names to use for the various series. By default, we use '
124154
'Baseline and Candidate for two input files, and CandidateN for subsequent inputs.')
155+
=======
156+
parser.add_argument('--baseline-name', type=str, default='Baseline',
157+
help='Optional name to use for the "baseline" label.')
158+
parser.add_argument('--candidate-name', type=str, default='Candidate',
159+
help='Optional name to use for the "candidate" label.')
160+
>>>>>>> c9042b8fa9e7 (Merge llvm/main into amd-debug)
125161
parser.add_argument('--subtitle', type=str, required=False,
126162
help='Optional subtitle to use for the chart. This can be used to help identify the contents of the chart. '
127163
'This option cannot be used with the plain text output.')
128164
args = parser.parse_args(argv)
129165

166+
<<<<<<< HEAD
130167
# Validate arguments (the values admissible for various arguments depend on other
131168
# arguments, the number of inputs, etc)
132169
if args.format == 'text':
@@ -136,6 +173,13 @@ def main(argv):
136173
parser.error('Passing --subtitle makes no sense with --format=text')
137174
if args.open:
138175
parser.error('Passing --open makes no sense with --format=text')
176+
=======
177+
if args.format == 'text' and args.subtitle is not None:
178+
parser.error('Passing --subtitle makes no sense with --format=text')
179+
180+
if args.format == 'text' and args.open:
181+
parser.error('Passing --open makes no sense with --format=text')
182+
>>>>>>> c9042b8fa9e7 (Merge llvm/main into amd-debug)
139183

140184
if len(args.files) != 2 and args.sort != 'benchmark':
141185
parser.error('Using any sort order other than `benchmark` requires exactly two input files.')
@@ -178,13 +222,24 @@ def main(argv):
178222
data = data.sort_values(by=f'percent')
179223

180224
if args.format == 'chart':
225+
<<<<<<< HEAD
181226
figure = create_chart(data, args.metric, subtitle=args.subtitle, series_names=args.series_names)
227+
=======
228+
figure = create_chart(benchmarks, baseline_series, candidate_series, subtitle=args.subtitle,
229+
baseline_name=args.baseline_name,
230+
candidate_name=args.candidate_name)
231+
>>>>>>> c9042b8fa9e7 (Merge llvm/main into amd-debug)
182232
do_open = args.output is None or args.open
183233
output = args.output or tempfile.NamedTemporaryFile(suffix='.html').name
184234
plotly.io.write_html(figure, file=output, auto_open=do_open)
185235
else:
236+
<<<<<<< HEAD
186237
diff = plain_text_comparison(data, args.metric, baseline_name=args.series_names[0],
187238
candidate_name=args.series_names[1])
239+
=======
240+
diff = plain_text_comparison(benchmarks, baseline_series, candidate_series, baseline_name=args.baseline_name,
241+
candidate_name=args.candidate_name)
242+
>>>>>>> c9042b8fa9e7 (Merge llvm/main into amd-debug)
188243
diff += '\n'
189244
if args.output is not None:
190245
with open(args.output, 'w') as out:

libcxx/utils/visualize-historical

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,21 +112,37 @@ def truncate_lines(string, n, marker=None):
112112
assert len(truncated) <= n, "broken post-condition"
113113
return '\n'.join(truncated)
114114

115+
<<<<<<< HEAD
115116
def create_plot(data, metric, trendline=None, subtitle=None):
117+
=======
118+
def create_plot(data, metric, subtitle=None):
119+
>>>>>>> c9042b8fa9e7 (Merge llvm/main into amd-debug)
116120
"""
117121
Create a plot object showing the evolution of each benchmark throughout the given commits for
118122
the given metric.
119123
"""
124+
<<<<<<< HEAD
120125
data = data.sort_values(by=['revlist_order', 'benchmark'])
126+
=======
127+
data = data.sort_values(by=['date', 'benchmark'])
128+
>>>>>>> c9042b8fa9e7 (Merge llvm/main into amd-debug)
121129
revlist = pandas.unique(data['commit']) # list of all commits in chronological order
122130
hover_info = {c: truncate_lines(c.show(), 30, marker='...').replace('\n', '<br>') for c in revlist}
123131
figure = plotly.express.scatter(data, title=f"{revlist[0].shortrev} to {revlist[-1].shortrev}",
124132
subtitle=subtitle,
133+
<<<<<<< HEAD
125134
x='revlist_order', y=metric,
126135
symbol='benchmark',
127136
color='benchmark',
128137
hover_name=[hover_info[c] for c in data['commit']],
129138
trendline=trendline)
139+
=======
140+
x='date', y=metric,
141+
symbol='benchmark',
142+
color='benchmark',
143+
hover_name=[hover_info[c] for c in data['commit']],
144+
trendline="lowess")
145+
>>>>>>> c9042b8fa9e7 (Merge llvm/main into amd-debug)
130146
return figure
131147

132148
def directory_path(string):
@@ -213,6 +229,16 @@ def main(argv):
213229
'Since the chart is interactive, it generally makes most sense to include all the benchmarks '
214230
'and to then filter them in the browser, but in some cases producing a chart with a reduced '
215231
'number of data series is useful.')
232+
<<<<<<< HEAD
233+
=======
234+
parser.add_argument('--find-outliers', metavar='FLOAT', type=float, required=False,
235+
help='Instead of building a chart, detect commits that show a large spike (more than the given relative threshold) '
236+
'with the previous result and print those to standard output. This can be used to generate a list of '
237+
'potential outliers that we might want to re-generate the data for. The threshold is expressed as a '
238+
'floating point number, e.g. 0.25 will detect points that differ by more than 25%% from their previous '
239+
'result. This option respects --filter, i.e. only benchmarks that match the filter will be analyzed for '
240+
'outliers.')
241+
>>>>>>> c9042b8fa9e7 (Merge llvm/main into amd-debug)
216242
parser.add_argument('--subtitle', type=str, required=False,
217243
help='Optional subtitle for the chart. This can be used to help identify the contents of the chart.')
218244
parser.add_argument('--git-repo', type=directory_path, default=pathlib.Path(os.getcwd()),
@@ -258,7 +284,11 @@ def main(argv):
258284
raise RuntimeError(f'Filter "{args.filter}" resulted in empty data set -- nothing to plot')
259285

260286
# Plot the data for all the required benchmarks.
287+
<<<<<<< HEAD
261288
figure = create_plot(data, args.metric, trendline=args.trendline, subtitle=args.subtitle)
289+
=======
290+
figure = create_plot(data, args.metric, subtitle=args.subtitle)
291+
>>>>>>> c9042b8fa9e7 (Merge llvm/main into amd-debug)
262292
do_open = args.output is None or args.open
263293
output = args.output if args.output is not None else tempfile.NamedTemporaryFile(suffix='.html').name
264294
plotly.io.write_html(figure, file=output, auto_open=do_open)

0 commit comments

Comments
 (0)