xref: /freebsd/contrib/llvm-project/llvm/include/llvm/CodeGen/BranchFoldingPass.h (revision 700637cbb5e582861067a11aaca4d053546871d2)
1 //===- llvm/CodeGen/BranchFoldingPass.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 #ifndef LLVM_CODEGEN_BRANCHFOLDINGPASS_H
9 #define LLVM_CODEGEN_BRANCHFOLDINGPASS_H
10 
11 #include "llvm/CodeGen/MachinePassManager.h"
12 
13 namespace llvm {
14 
15 class BranchFolderPass : public PassInfoMixin<BranchFolderPass> {
16   bool EnableTailMerge;
17 
18 public:
BranchFolderPass(bool EnableTailMerge)19   BranchFolderPass(bool EnableTailMerge) : EnableTailMerge(EnableTailMerge) {}
20   PreservedAnalyses run(MachineFunction &MF,
21                         MachineFunctionAnalysisManager &MFAM);
22 
getRequiredProperties()23   MachineFunctionProperties getRequiredProperties() const {
24     return MachineFunctionProperties().setNoPHIs();
25   }
26 };
27 
28 } // namespace llvm
29 
30 #endif // LLVM_CODEGEN_BRANCHFOLDINGPASS_H
31