LLVM 20.0.0git
LowerIFunc.cpp
Go to the documentation of this file.
1//===- LowerIFunc.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// This file implements replacing calls to ifuncs by introducing indirect calls.
10//
11//===----------------------------------------------------------------------===//
12
14#include "llvm/IR/Module.h"
15#include "llvm/Pass.h"
17
18using namespace llvm;
19
20/// Replace all call users of ifuncs in the module.
22 if (M.ifunc_empty())
24
27}
Module.h This file contains the declarations for the Module class.
A container for analyses that lazily runs them and caches their results.
Definition: PassManager.h:253
PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM)
Replace all call users of ifuncs in the module.
Definition: LowerIFunc.cpp:21
A Module instance is used to store all the information related to an LLVM module.
Definition: Module.h:65
A set of analyses that are preserved following a run of a transformation pass.
Definition: Analysis.h:111
static PreservedAnalyses none()
Convenience factory function for the empty preserved set.
Definition: Analysis.h:114
static PreservedAnalyses all()
Construct a special preserved set that preserves all passes.
Definition: Analysis.h:117
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
bool lowerGlobalIFuncUsersAsGlobalCtor(Module &M, ArrayRef< GlobalIFunc * > IFuncsToLower={})
Lower all calls to ifuncs by replacing uses with indirect calls loaded out of a global table initiali...