LLVM 22.0.0git
BasicBlockSections.cpp
Go to the documentation of this file.
1//===-- BasicBlockSections.cpp ---=========--------------------------------===//
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// BasicBlockSections implementation.
10//
11// The purpose of this pass is to assign sections to basic blocks when
12// -fbasic-block-sections= option is used. Further, with profile information
13// only the subset of basic blocks with profiles are placed in separate sections
14// and the rest are grouped in a cold section. The exception handling blocks are
15// treated specially to ensure they are all in one seciton.
16//
17// Basic Block Sections
18// ====================
19//
20// With option, -fbasic-block-sections=list, every function may be split into
21// clusters of basic blocks. Every cluster will be emitted into a separate
22// section with its basic blocks sequenced in the given order. To get the
23// optimized performance, the clusters must form an optimal BB layout for the
24// function. We insert a symbol at the beginning of every cluster's section to
25// allow the linker to reorder the sections in any arbitrary sequence. A global
26// order of these sections would encapsulate the function layout.
27// For example, consider the following clusters for a function foo (consisting
28// of 6 basic blocks 0, 1, ..., 5).
29//
30// 0 2
31// 1 3 5
32//
33// * Basic blocks 0 and 2 are placed in one section with symbol `foo`
34// referencing the beginning of this section.
35// * Basic blocks 1, 3, 5 are placed in a separate section. A new symbol
36// `foo.__part.1` will reference the beginning of this section.
37// * Basic block 4 (note that it is not referenced in the list) is placed in
38// one section, and a new symbol `foo.cold` will point to it.
39//
40// There are a couple of challenges to be addressed:
41//
42// 1. The last basic block of every cluster should not have any implicit
43// fallthrough to its next basic block, as it can be reordered by the linker.
44// The compiler should make these fallthroughs explicit by adding
45// unconditional jumps..
46//
47// 2. All inter-cluster branch targets would now need to be resolved by the
48// linker as they cannot be calculated during compile time. This is done
49// using static relocations. Further, the compiler tries to use short branch
50// instructions on some ISAs for small branch offsets. This is not possible
51// for inter-cluster branches as the offset is not determined at compile
52// time, and therefore, long branch instructions have to be used for those.
53//
54// 3. Debug Information (DebugInfo) and Call Frame Information (CFI) emission
55// needs special handling with basic block sections. DebugInfo needs to be
56// emitted with more relocations as basic block sections can break a
57// function into potentially several disjoint pieces, and CFI needs to be
58// emitted per cluster. This also bloats the object file and binary sizes.
59//
60// Basic Block Address Map
61// ==================
62//
63// With -fbasic-block-address-map, we emit the offsets of BB addresses of
64// every function into the .llvm_bb_addr_map section. Along with the function
65// symbols, this allows for mapping of virtual addresses in PMU profiles back to
66// the corresponding basic blocks. This logic is implemented in AsmPrinter. This
67// pass only assigns the BBSectionType of every function to ``labels``.
68//
69//===----------------------------------------------------------------------===//
70
72#include "llvm/ADT/StringRef.h"
80#include "llvm/CodeGen/Passes.h"
86#include <optional>
87
88using namespace llvm;
89
90// Placing the cold clusters in a separate section mitigates against poor
91// profiles and allows optimizations such as hugepage mapping to be applied at a
92// section granularity. Defaults to ".text.split." which is recognized by lld
93// via the `-z keep-text-section-prefix` flag.
95 "bbsections-cold-text-prefix",
96 cl::desc("The text prefix to use for cold basic block clusters"),
97 cl::init(".text.split."), cl::Hidden);
98
100 "bbsections-detect-source-drift",
101 cl::desc("This checks if there is a fdo instr. profile hash "
102 "mismatch for this function"),
103 cl::init(true), cl::Hidden);
104
105namespace {
106
107class BasicBlockSections : public MachineFunctionPass {
108public:
109 static char ID;
110
111 BasicBlockSectionsProfileReaderWrapperPass *BBSectionsProfileReader = nullptr;
112
113 BasicBlockSections() : MachineFunctionPass(ID) {
115 }
116
117 StringRef getPassName() const override {
118 return "Basic Block Sections Analysis";
119 }
120
121 void getAnalysisUsage(AnalysisUsage &AU) const override;
122
123 /// Identify basic blocks that need separate sections and prepare to emit them
124 /// accordingly.
125 bool runOnMachineFunction(MachineFunction &MF) override;
126
127private:
128 bool handleBBSections(MachineFunction &MF);
129 bool handleBBAddrMap(MachineFunction &MF);
130};
131
132} // end anonymous namespace
133
134char BasicBlockSections::ID = 0;
136 BasicBlockSections, "bbsections-prepare",
137 "Prepares for basic block sections, by splitting functions "
138 "into clusters of basic blocks.",
139 false, false)
141INITIALIZE_PASS_END(BasicBlockSections, "bbsections-prepare",
142 "Prepares for basic block sections, by splitting functions "
143 "into clusters of basic blocks.",
145
146// This function updates and optimizes the branching instructions of every basic
147// block in a given function to account for changes in the layout.
148static void
150 const SmallVector<MachineBasicBlock *> &PreLayoutFallThroughs) {
151 const TargetInstrInfo *TII = MF.getSubtarget().getInstrInfo();
153 for (auto &MBB : MF) {
154 auto NextMBBI = std::next(MBB.getIterator());
155 auto *FTMBB = PreLayoutFallThroughs[MBB.getNumber()];
156 // If this block had a fallthrough before we need an explicit unconditional
157 // branch to that block if either
158 // 1- the block ends a section, which means its next block may be
159 // reorderd by the linker, or
160 // 2- the fallthrough block is not adjacent to the block in the new
161 // order.
162 if (FTMBB && (MBB.isEndSection() || &*NextMBBI != FTMBB))
163 TII->insertUnconditionalBranch(MBB, FTMBB, MBB.findBranchDebugLoc());
164
165 // We do not optimize branches for machine basic blocks ending sections, as
166 // their adjacent block might be reordered by the linker.
167 if (MBB.isEndSection())
168 continue;
169
170 // It might be possible to optimize branches by flipping the branch
171 // condition.
172 Cond.clear();
173 MachineBasicBlock *TBB = nullptr, *FBB = nullptr; // For analyzeBranch.
174 if (TII->analyzeBranch(MBB, TBB, FBB, Cond))
175 continue;
176 MBB.updateTerminator(FTMBB);
177 }
178}
179
180// This function generates the machine basic block clusters of "hot" blocks.
181// Currently, only support one cluster creation.
182// TODO: Support multi-cluster creation and path cloning.
186 SmallVector<BBClusterInfo> BBClusterInfos;
187 auto OptWeightInfo = BMI.getWeightInfo(MF.getName());
188 if (!OptWeightInfo)
189 return BBClusterInfos;
190 auto BlockWeights = OptWeightInfo->BlockWeights;
191 auto EdgeWeights = OptWeightInfo->EdgeWeights;
192
194 if (MF.size() <= 2) {
195 for (auto &MBB : MF) {
196 if (MBB.isEntryBlock() || BlockWeights[&MBB] > 0) {
197 HotMBBs.push_back(&MBB);
198 }
199 }
200 } else {
201 SmallVector<uint64_t, 0> BlockSizes(MF.size());
202 SmallVector<uint64_t, 0> BlockCounts(MF.size());
203 std::vector<const MachineBasicBlock *> OrigOrder;
204 OrigOrder.reserve(MF.size());
206
207 // Renumber blocks for running the layout algorithm.
208 MF.RenumberBlocks();
209
210 // Init the MBB size and count.
211 for (auto &MBB : MF) {
212 auto NonDbgInsts =
213 instructionsWithoutDebug(MBB.instr_begin(), MBB.instr_end());
214 int NumInsts = std::distance(NonDbgInsts.begin(), NonDbgInsts.end());
215 BlockSizes[MBB.getNumber()] = 4 * NumInsts;
216 BlockCounts[MBB.getNumber()] = BlockWeights[&MBB];
217 OrigOrder.push_back(&MBB);
218 }
219
220 // Init the edge count.
221 for (auto &MBB : MF) {
222 for (auto *Succ : MBB.successors()) {
223 auto EdgeWeight = EdgeWeights[std::make_pair(&MBB, Succ)];
224 JumpCounts.push_back({static_cast<uint64_t>(MBB.getNumber()),
225 static_cast<uint64_t>(Succ->getNumber()),
226 EdgeWeight});
227 }
228 }
229
230 // Run the layout algorithm.
231 auto Result = computeExtTspLayout(BlockSizes, BlockCounts, JumpCounts);
232 for (uint64_t R : Result) {
233 auto Block = OrigOrder[R];
234 if (Block->isEntryBlock() || BlockWeights[Block] > 0)
235 HotMBBs.push_back(Block);
236 }
237 }
238
239 // Generate the "hot" basic block cluster.
240 if (!HotMBBs.empty()) {
241 unsigned CurrentPosition = 0;
242 for (auto &MBB : HotMBBs) {
243 if (MBB->getBBID()) {
244 BBClusterInfos.push_back({*(MBB->getBBID()), 0, CurrentPosition++});
245 }
246 }
247 }
248 return BBClusterInfos;
249}
250
251// This function sorts basic blocks according to the cluster's information.
252// All explicitly specified clusters of basic blocks will be ordered
253// accordingly. All non-specified BBs go into a separate "Cold" section.
254// Additionally, if exception handling landing pads end up in more than one
255// clusters, they are moved into a single "Exception" section. Eventually,
256// clusters are ordered in increasing order of their IDs, with the "Exception"
257// and "Cold" succeeding all other clusters.
258// FuncClusterInfo represents the cluster information for basic blocks. It
259// maps from BBID of basic blocks to their cluster information.
260static void
262 const DenseMap<UniqueBBID, BBClusterInfo> &FuncClusterInfo) {
263 assert(MF.hasBBSections() && "BB Sections is not set for function.");
264 // This variable stores the section ID of the cluster containing eh_pads (if
265 // all eh_pads are one cluster). If more than one cluster contain eh_pads, we
266 // set it equal to ExceptionSectionID.
267 std::optional<MBBSectionID> EHPadsSectionID;
268
269 for (auto &MBB : MF) {
270 // With the 'all' option, every basic block is placed in a unique section.
271 // With the 'list' option, every basic block is placed in a section
272 // associated with its cluster.
274 // If unique sections are desired for all basic blocks of the function, we
275 // set every basic block's section ID equal to its original position in
276 // the layout (which is equal to its number). This ensures that basic
277 // blocks are ordered canonically.
278 MBB.setSectionID(MBB.getNumber());
279 } else {
280 auto I = FuncClusterInfo.find(*MBB.getBBID());
281 if (I != FuncClusterInfo.end()) {
282 MBB.setSectionID(I->second.ClusterID);
283 } else {
284 const TargetInstrInfo &TII =
285 *MBB.getParent()->getSubtarget().getInstrInfo();
286
287 if (TII.isMBBSafeToSplitToCold(MBB)) {
288 // BB goes into the special cold section if it is not specified in the
289 // cluster info map.
290 MBB.setSectionID(MBBSectionID::ColdSectionID);
291 }
292 }
293 }
294
295 if (MBB.isEHPad() && EHPadsSectionID != MBB.getSectionID() &&
296 EHPadsSectionID != MBBSectionID::ExceptionSectionID) {
297 // If we already have one cluster containing eh_pads, this must be updated
298 // to ExceptionSectionID. Otherwise, we set it equal to the current
299 // section ID.
300 EHPadsSectionID = EHPadsSectionID ? MBBSectionID::ExceptionSectionID
301 : MBB.getSectionID();
302 }
303 }
304
305 // If EHPads are in more than one section, this places all of them in the
306 // special exception section.
307 if (EHPadsSectionID == MBBSectionID::ExceptionSectionID)
308 for (auto &MBB : MF)
309 if (MBB.isEHPad())
310 MBB.setSectionID(*EHPadsSectionID);
311}
312
315 [[maybe_unused]] const MachineBasicBlock *EntryBlock = &MF.front();
316 SmallVector<MachineBasicBlock *> PreLayoutFallThroughs(MF.getNumBlockIDs());
317 for (auto &MBB : MF)
318 PreLayoutFallThroughs[MBB.getNumber()] =
319 MBB.getFallThrough(/*JumpToFallThrough=*/false);
320
321 MF.sort(MBBCmp);
322 assert(&MF.front() == EntryBlock &&
323 "Entry block should not be displaced by basic block sections");
324
325 // Set IsBeginSection and IsEndSection according to the assigned section IDs.
327
328 // After reordering basic blocks, we must update basic block branches to
329 // insert explicit fallthrough branches when required and optimize branches
330 // when possible.
331 updateBranches(MF, PreLayoutFallThroughs);
332}
333
334// If the exception section begins with a landing pad, that landing pad will
335// assume a zero offset (relative to @LPStart) in the LSDA. However, a value of
336// zero implies "no landing pad." This function inserts a NOP just before the EH
337// pad label to ensure a nonzero offset.
339 std::optional<MBBSectionID> CurrentSection;
340 auto IsFirstNonEmptyBBInSection = [&](const MachineBasicBlock &MBB) {
341 if (MBB.empty() || MBB.getSectionID() == CurrentSection)
342 return false;
343 CurrentSection = MBB.getSectionID();
344 return true;
345 };
346
347 for (auto &MBB : MF) {
348 if (IsFirstNonEmptyBBInSection(MBB) && MBB.isEHPad()) {
350 while (!MI->isEHLabel())
351 ++MI;
353 }
354 }
355}
356
359 return false;
360
361 const char MetadataName[] = "instr_prof_hash_mismatch";
362 auto *Existing = MF.getFunction().getMetadata(LLVMContext::MD_annotation);
363 if (Existing) {
364 MDTuple *Tuple = cast<MDTuple>(Existing);
365 for (const auto &N : Tuple->operands())
366 if (N.equalsStr(MetadataName))
367 return true;
368 }
369
370 return false;
371}
372
373// Identify, arrange, and modify basic blocks which need separate sections
374// according to the specification provided by the -fbasic-block-sections flag.
375bool BasicBlockSections::handleBBSections(MachineFunction &MF) {
376 auto BBSectionsType = MF.getTarget().getBBSectionsType();
377 if (BBSectionsType == BasicBlockSection::None)
378 return false;
379
380 // Check for source drift. If the source has changed since the profiles
381 // were obtained, optimizing basic blocks might be sub-optimal.
382 // This only applies to BasicBlockSection::List as it creates
383 // clusters of basic blocks using basic block ids. Source drift can
384 // invalidate these groupings leading to sub-optimal code generation with
385 // regards to performance.
386 if (BBSectionsType == BasicBlockSection::List &&
388 return false;
389
391 if (BBSectionsType == BasicBlockSection::List) {
393 if (auto *BMI = getAnalysisIfAvailable<BasicBlockMatchingAndInference>()) {
395 } else {
396 ClusterInfo = getAnalysis<BasicBlockSectionsProfileReaderWrapperPass>()
397 .getClusterInfoForFunction(MF.getName());
398 }
399 if (ClusterInfo.empty())
400 return false;
401 for (auto &BBClusterInfo : ClusterInfo) {
402 FuncClusterInfo.try_emplace(BBClusterInfo.BBID, BBClusterInfo);
403 }
404 }
405
406 // Renumber blocks before sorting them. This is useful for accessing the
407 // original layout positions and finding the original fallthroughs.
408 MF.RenumberBlocks();
409
410 MF.setBBSectionsType(BBSectionsType);
411 assignSections(MF, FuncClusterInfo);
412
413 const MachineBasicBlock &EntryBB = MF.front();
414 auto EntryBBSectionID = EntryBB.getSectionID();
415
416 // Helper function for ordering BB sections as follows:
417 // * Entry section (section including the entry block).
418 // * Regular sections (in increasing order of their Number).
419 // ...
420 // * Exception section
421 // * Cold section
422 auto MBBSectionOrder = [EntryBBSectionID](const MBBSectionID &LHS,
423 const MBBSectionID &RHS) {
424 // We make sure that the section containing the entry block precedes all the
425 // other sections.
426 if (LHS == EntryBBSectionID || RHS == EntryBBSectionID)
427 return LHS == EntryBBSectionID;
428 return LHS.Type == RHS.Type ? LHS.Number < RHS.Number : LHS.Type < RHS.Type;
429 };
430
431 // We sort all basic blocks to make sure the basic blocks of every cluster are
432 // contiguous and ordered accordingly. Furthermore, clusters are ordered in
433 // increasing order of their section IDs, with the exception and the
434 // cold section placed at the end of the function.
435 // Also, we force the entry block of the function to be placed at the
436 // beginning of the function, regardless of the requested order.
437 auto Comparator = [&](const MachineBasicBlock &X,
438 const MachineBasicBlock &Y) {
439 auto XSectionID = X.getSectionID();
440 auto YSectionID = Y.getSectionID();
441 if (XSectionID != YSectionID)
442 return MBBSectionOrder(XSectionID, YSectionID);
443 // Make sure that the entry block is placed at the beginning.
444 if (&X == &EntryBB || &Y == &EntryBB)
445 return &X == &EntryBB;
446 // If the two basic block are in the same section, the order is decided by
447 // their position within the section.
448 if (XSectionID.Type == MBBSectionID::SectionType::Default)
449 return FuncClusterInfo.lookup(*X.getBBID()).PositionInCluster <
450 FuncClusterInfo.lookup(*Y.getBBID()).PositionInCluster;
451 return X.getNumber() < Y.getNumber();
452 };
453
454 sortBasicBlocksAndUpdateBranches(MF, Comparator);
456 return true;
457}
458
459// When the BB address map needs to be generated, this renumbers basic blocks to
460// make them appear in increasing order of their IDs in the function. This
461// avoids the need to store basic block IDs in the BB address map section, since
462// they can be determined implicitly.
463bool BasicBlockSections::handleBBAddrMap(MachineFunction &MF) {
464 if (!MF.getTarget().Options.BBAddrMap)
465 return false;
466 MF.RenumberBlocks();
467 return true;
468}
469
470bool BasicBlockSections::runOnMachineFunction(MachineFunction &MF) {
471 // First handle the basic block sections.
472 auto R1 = handleBBSections(MF);
473 // Handle basic block address map after basic block sections are finalized.
474 auto R2 = handleBBAddrMap(MF);
475
476 // We renumber blocks, so update the dominator tree we want to preserve.
477 if (auto *WP = getAnalysisIfAvailable<MachineDominatorTreeWrapperPass>())
478 WP->getDomTree().updateBlockNumbers();
479 if (auto *WP = getAnalysisIfAvailable<MachinePostDominatorTreeWrapperPass>())
480 WP->getPostDomTree().updateBlockNumbers();
481
482 return R1 || R2;
483}
484
485void BasicBlockSections::getAnalysisUsage(AnalysisUsage &AU) const {
486 AU.setPreservesAll();
487 AU.addRequired<BasicBlockSectionsProfileReaderWrapperPass>();
488 AU.addUsedIfAvailable<BasicBlockMatchingAndInference>();
489 AU.addUsedIfAvailable<MachineDominatorTreeWrapperPass>();
490 AU.addUsedIfAvailable<MachinePostDominatorTreeWrapperPass>();
492}
493
495 return new BasicBlockSections();
496}
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
aarch64 promote const
const TargetInstrInfo & TII
MachineBasicBlock & MBB
static void assignSections(MachineFunction &MF, const DenseMap< UniqueBBID, BBClusterInfo > &FuncClusterInfo)
static cl::opt< bool > BBSectionsDetectSourceDrift("bbsections-detect-source-drift", cl::desc("This checks if there is a fdo instr. profile hash " "mismatch for this function"), cl::init(true), cl::Hidden)
bbsections Prepares for basic block by splitting functions into clusters of basic static false void updateBranches(MachineFunction &MF, const SmallVector< MachineBasicBlock * > &PreLayoutFallThroughs)
static SmallVector< BBClusterInfo > createBBClusterInfoForFunction(MachineFunction &MF, const BasicBlockMatchingAndInference &BMI)
Declares methods and data structures for code layout algorithms.
IRTranslator LLVM IR MI
#define I(x, y, z)
Definition MD5.cpp:57
#define R2(n)
#define INITIALIZE_PASS_DEPENDENCY(depName)
Definition PassSupport.h:42
#define INITIALIZE_PASS_END(passName, arg, name, cfg, analysis)
Definition PassSupport.h:44
#define INITIALIZE_PASS_BEGIN(passName, arg, name, cfg, analysis)
Definition PassSupport.h:39
const SmallVectorImpl< MachineOperand > MachineBasicBlock * TBB
const SmallVectorImpl< MachineOperand > & Cond
This file defines the SmallVector class.
static TableGen::Emitter::Opt Y("gen-skeleton-entry", EmitSkeleton, "Generate example skeleton entry")
static TableGen::Emitter::OptClass< SkeletonEmitter > X("gen-skeleton-class", "Generate example skeleton class")
Value * RHS
Value * LHS
AnalysisUsage & addUsedIfAvailable()
Add the specified Pass class to the set of analyses used by this pass.
AnalysisUsage & addRequired()
void setPreservesAll()
Set by analyses that do not transform their input at all.
std::optional< WeightInfo > getWeightInfo(StringRef FuncName) const
ValueT lookup(const_arg_type_t< KeyT > Val) const
lookup - Return the entry for the specified key, or a default constructed value if no such entry exis...
Definition DenseMap.h:205
iterator find(const_arg_type_t< KeyT > Val)
Definition DenseMap.h:178
std::pair< iterator, bool > try_emplace(KeyT &&Key, Ts &&...Args)
Definition DenseMap.h:256
iterator end()
Definition DenseMap.h:81
MDNode * getMetadata(unsigned KindID) const
Get the current metadata attachments for the given kind, if any.
Definition Value.h:576
Tuple of metadata.
Definition Metadata.h:1497
MBBSectionID getSectionID() const
Returns the section ID of this basic block.
MachineInstrBundleIterator< MachineInstr > iterator
MachineFunctionPass - This class adapts the FunctionPass interface to allow convenient creation of pa...
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - Subclasses that override getAnalysisUsage must call this.
void setBBSectionsType(BasicBlockSection V)
const TargetSubtargetInfo & getSubtarget() const
getSubtarget - Return the subtarget for which this machine code is being compiled.
StringRef getName() const
getName - Return the name of the corresponding LLVM function.
bool hasBBSections() const
Returns true if this function has basic block sections enabled.
unsigned size() const
Function & getFunction()
Return the LLVM function that this machine code represents.
unsigned getNumBlockIDs() const
getNumBlockIDs - Return the number of MBB ID's allocated.
void RenumberBlocks(MachineBasicBlock *MBBFrom=nullptr)
RenumberBlocks - This discards all of the MachineBasicBlock numbers and recomputes them.
const MachineBasicBlock & front() const
void assignBeginEndSections()
Assign IsBeginSection IsEndSection fields for basic blocks in this function.
const TargetMachine & getTarget() const
getTarget - Return the target machine this machine code is compiled with
static LLVM_ABI PassRegistry * getPassRegistry()
getPassRegistry - Access the global registry object, which is automatically initialized at applicatio...
void push_back(const T &Elt)
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
TargetInstrInfo - Interface to description of machine instruction set.
virtual void insertNoop(MachineBasicBlock &MBB, MachineBasicBlock::iterator MI) const
Insert a noop into the instruction stream at the specified point.
TargetOptions Options
llvm::BasicBlockSection getBBSectionsType() const
If basic blocks should be emitted into their own section, corresponding to -fbasic-block-sections.
virtual const TargetInstrInfo * getInstrInfo() const
unsigned ID
LLVM IR allows to use arbitrary numbers as calling convention identifiers.
Definition CallingConv.h:24
initializer< Ty > init(const Ty &Val)
This is an optimization pass for GlobalISel generic memory operations.
LLVM_ABI MachineFunctionPass * createBasicBlockSectionsPass()
createBasicBlockSections Pass - This pass assigns sections to machine basic blocks and is enabled wit...
LLVM_ABI void initializeBasicBlockSectionsPass(PassRegistry &)
auto instructionsWithoutDebug(IterT It, IterT End, bool SkipPseudoOp=true)
Construct a range iterator which begins at It and moves forwards until End is reached,...
bool hasInstrProfHashMismatch(MachineFunction &MF)
This checks if the source of this function has drifted since this binary was profiled previously.
SmallPtrSet< SUnit *, 8 > ClusterInfo
Keep record of which SUnit are in the same cluster group.
decltype(auto) cast(const From &Val)
cast<X> - Return the argument parameter cast to the specified type.
Definition Casting.h:559
void avoidZeroOffsetLandingPad(MachineFunction &MF)
cl::opt< std::string > BBSectionsColdTextPrefix
function_ref< bool(const MachineBasicBlock &, const MachineBasicBlock &)> MachineBasicBlockComparator
void sortBasicBlocksAndUpdateBranches(MachineFunction &MF, MachineBasicBlockComparator MBBCmp)
#define N
LLVM_ABI static const MBBSectionID ExceptionSectionID
LLVM_ABI static const MBBSectionID ColdSectionID