1//===- Uniformity.h --------------------------------------*- C++ -*--------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#ifndef LLVM_ADT_UNIFORMITY_H
10#define LLVM_ADT_UNIFORMITY_H
11
12namespace llvm {
13
14/// Enum describing how values behave with respect to uniformity and
15/// divergence, to answer the question: if the same instruction is executed by
16/// two threads in a convergent set of threads, will its result value be
17/// uniform, i.e. the same on both threads?
18enum class ValueUniformity {
19 /// The result value is uniform if and only if all operands are uniform.
20 Default,
21
22 /// The result value is always uniform.
23 AlwaysUniform,
24
25 /// The result value can never be assumed to be uniform.
26 NeverUniform,
27
28 /// The result value requires a custom uniformity check. A target-specific
29 /// callback determines whether the result is uniform based on which
30 /// operands are uniform.
31 Custom
32};
33
34} // namespace llvm
35#endif // LLVM_ADT_UNIFORMITY_H
36