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 | |
12 | namespace llvm { |
13 | |
14 | /// Enum describing how instructions 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(s) be |
17 | /// uniform, i.e. the same on both threads? |
18 | enum class InstructionUniformity { |
19 | /// The result values are uniform if and only if all operands are uniform. |
20 | Default, |
21 | |
22 | /// The result values are always uniform. |
23 | AlwaysUniform, |
24 | |
25 | /// The result values can never be assumed to be uniform. |
26 | NeverUniform |
27 | }; |
28 | |
29 | } // namespace llvm |
30 | #endif // LLVM_ADT_UNIFORMITY_H |
31 | |