LLVM 20.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
17extern cl::opt<std::string> BBSectionsColdTextPrefix;
18
19class MachineFunction;
20class MachineBasicBlock;
21
24
27
29
30/// This checks if the source of this function has drifted since this binary was
31/// profiled previously.
32/// For now, we are piggy backing on what PGO does to
33/// detect this with instrumented profiles. PGO emits an hash of the IR and
34/// checks if the hash has changed. Advanced basic block layout is usually done
35/// on top of PGO optimized binaries and hence this check works well in
36/// practice.
38
39} // end namespace llvm
40
41#endif // LLVM_CODEGEN_BASICBLOCKSECTIONUTILS_H
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.
Definition: AddressRanges.h:18
bool hasInstrProfHashMismatch(MachineFunction &MF)
This checks if the source of this function has drifted since this binary was profiled previously.
void avoidZeroOffsetLandingPad(MachineFunction &MF)
cl::opt< std::string > BBSectionsColdTextPrefix
void sortBasicBlocksAndUpdateBranches(MachineFunction &MF, MachineBasicBlockComparator MBBCmp)