Uniformity.h 1.3 KB

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