1 //===- MachineUniformityAnalysis.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 /// \file
10 /// \brief Machine IR instance of the generic uniformity analysis
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef LLVM_CODEGEN_MACHINEUNIFORMITYANALYSIS_H
15 #define LLVM_CODEGEN_MACHINEUNIFORMITYANALYSIS_H
16 
17 #include "llvm/ADT/GenericUniformityInfo.h"
18 #include "llvm/CodeGen/MachineCycleAnalysis.h"
19 #include "llvm/CodeGen/MachineDominators.h"
20 #include "llvm/CodeGen/MachineSSAContext.h"
21 
22 namespace llvm {
23 
24 extern template class GenericUniformityInfo<MachineSSAContext>;
25 using MachineUniformityInfo = GenericUniformityInfo<MachineSSAContext>;
26 
27 /// \brief Compute uniformity information for a Machine IR function.
28 ///
29 /// If \p HasBranchDivergence is false, produces a dummy result which assumes
30 /// everything is uniform.
31 MachineUniformityInfo computeMachineUniformityInfo(
32     MachineFunction &F, const MachineCycleInfo &cycleInfo,
33     const MachineDomTree &domTree, bool HasBranchDivergence);
34 
35 } // namespace llvm
36 
37 #endif // LLVM_CODEGEN_MACHINEUNIFORMITYANALYSIS_H
38