blob: d8da3be0cd4c31730cdec547b86ff6f0c27729d0 [file] [log] [blame]
Olivier Deprezf4ef2d02021-04-20 13:36:24 +02001//===- BasicBlockSectionUtils.h - Utilities for basic block sections --===//
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#ifndef LLVM_CODEGEN_BASICBLOCKSECTIONUTILS_H
10#define LLVM_CODEGEN_BASICBLOCKSECTIONUTILS_H
11
12#include "llvm/ADT/STLExtras.h"
13#include "llvm/Support/CommandLine.h"
14
15namespace llvm {
16
17extern cl::opt<std::string> BBSectionsColdTextPrefix;
18
19class MachineFunction;
20class MachineBasicBlock;
21
22using MachineBasicBlockComparator =
23 function_ref<bool(const MachineBasicBlock &, const MachineBasicBlock &)>;
24
25void sortBasicBlocksAndUpdateBranches(MachineFunction &MF,
26 MachineBasicBlockComparator MBBCmp);
27
28} // end namespace llvm
29
30#endif // LLVM_CODEGEN_BASICBLOCKSECTIONUTILS_H