LLVM  16.0.0git
CtorUtils.h
Go to the documentation of this file.
1 //===- CtorUtils.h - Helpers for working with global_ctors ------*- 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 //
9 // This file defines functions that are used to process llvm.global_ctors.
10 //
11 //===----------------------------------------------------------------------===//
12 
13 #ifndef LLVM_TRANSFORMS_UTILS_CTORUTILS_H
14 #define LLVM_TRANSFORMS_UTILS_CTORUTILS_H
15 
17 
18 namespace llvm {
19 
20 class Function;
21 class Module;
22 
23 /// Call "ShouldRemove" for every entry in M's global_ctor list and remove the
24 /// entries for which it returns true. Return true if anything changed.
26  Module &M, function_ref<bool(uint32_t, Function *)> ShouldRemove);
27 
28 } // namespace llvm
29 
30 #endif
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
M
We currently emits eax Perhaps this is what we really should generate is Is imull three or four cycles eax eax The current instruction priority is based on pattern complexity The former is more complex because it folds a load so the latter will not be emitted Perhaps we should use AddedComplexity to give LEA32r a higher priority We should always try to match LEA first since the LEA matching code does some estimate to determine whether the match is profitable if we care more about code then imull is better It s two bytes shorter than movl leal On a Pentium M
Definition: README.txt:252
STLFunctionalExtras.h
uint32_t
Module
Machine Check Debug Module
Definition: MachineCheckDebugify.cpp:122
llvm::optimizeGlobalCtorsList
bool optimizeGlobalCtorsList(Module &M, function_ref< bool(uint32_t, Function *)> ShouldRemove)
Call "ShouldRemove" for every entry in M's global_ctor list and remove the entries for which it retur...
Definition: CtorUtils.cpp:113
llvm::codeview::PublicSymFlags::Function
@ Function