blob: adba1cd618324446a1e6f07fcc9bcb2f81c12c47 [file] [log] [blame]
Stephen Hinesc6ca60f2023-05-09 02:19:22 -07001//===- 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//
10//===----------------------------------------------------------------------===//
11
12#ifndef LLVM_ADT_UNIFORMITY_H
13#define LLVM_ADT_UNIFORMITY_H
14
15namespace llvm {
16
17/// Enum describing how instructions behave with respect to uniformity and
18/// divergence, to answer the question: if the same instruction is executed by
19/// two threads in a convergent set of threads, will its result value(s) be
20/// uniform, i.e. the same on both threads?
21enum class InstructionUniformity {
22 /// The result values are uniform if and only if all operands are uniform.
23 Default,
24
25 /// The result values are always uniform.
26 AlwaysUniform,
27
28 /// The result values can never be assumed to be uniform.
29 NeverUniform
30};
31
32} // namespace llvm
33#endif // LLVM_ADT_UNIFORMITY_H