LLVM 23.0.0git
BasicBlockSectionUtils.h
Go to the documentation of this file.
1//===- 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"
14
15namespace llvm {
16
18
19class MachineFunction;
21
24
25LLVM_ABI void
28
30
31/// This checks if the source of this function has drifted since this binary was
32/// profiled previously.
33/// For now, we are piggy backing on what PGO does to
34/// detect this with instrumented profiles. PGO emits an hash of the IR and
35/// checks if the hash has changed. Advanced basic block layout is usually done
36/// on top of PGO optimized binaries and hence this check works well in
37/// practice.
39
40} // end namespace llvm
41
42#endif // LLVM_CODEGEN_BASICBLOCKSECTIONUTILS_H
#define LLVM_ABI
Definition Compiler.h:213
This file contains some templates that are useful if you are working with the STL at all.
An efficient, type-erasing, non-owning reference to a callable.
This is an optimization pass for GlobalISel generic memory operations.
LLVM_ABI bool hasInstrProfHashMismatch(MachineFunction &MF)
This checks if the source of this function has drifted since this binary was profiled previously.
LLVM_ABI void avoidZeroOffsetLandingPad(MachineFunction &MF)
LLVM_ABI cl::opt< std::string > BBSectionsColdTextPrefix
function_ref< bool(const MachineBasicBlock &, const MachineBasicBlock &)> MachineBasicBlockComparator
LLVM_ABI void sortBasicBlocksAndUpdateBranches(MachineFunction &MF, MachineBasicBlockComparator MBBCmp)