LLVM 22.0.0git
BranchFoldingPass.h
Go to the documentation of this file.
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
12
13namespace llvm {
14
15class BranchFolderPass : public PassInfoMixin<BranchFolderPass> {
16 bool EnableTailMerge;
17
18public:
19 BranchFolderPass(bool EnableTailMerge) : EnableTailMerge(EnableTailMerge) {}
22
24 return MachineFunctionProperties().setNoPHIs();
25 }
26};
27
28} // namespace llvm
29
30#endif // LLVM_CODEGEN_BRANCHFOLDINGPASS_H
A container for analyses that lazily runs them and caches their results.
Definition: PassManager.h:255
BranchFolderPass(bool EnableTailMerge)
MachineFunctionProperties getRequiredProperties() const
PreservedAnalyses run(MachineFunction &MF, MachineFunctionAnalysisManager &MFAM)
Properties which a MachineFunction may have at a given point in time.
A set of analyses that are preserved following a run of a transformation pass.
Definition: Analysis.h:112
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
A CRTP mix-in to automatically provide informational APIs needed for passes.
Definition: PassManager.h:70