1 //===- LowerIFunc.cpp -----------------------------------------------------===//
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
7 //===----------------------------------------------------------------------===//
9 // This file implements replacing calls to ifuncs by introducing indirect calls.
11 //===----------------------------------------------------------------------===//
13 #include "llvm/Transforms/Utils/LowerIFunc.h"
14 #include "llvm/IR/Module.h"
15 #include "llvm/Pass.h"
16 #include "llvm/Transforms/Utils/ModuleUtils.h"
20 /// Replace all call users of ifuncs in the module.
21 PreservedAnalyses
LowerIFuncPass::run(Module
&M
, ModuleAnalysisManager
&AM
) {
23 return PreservedAnalyses::all();
25 lowerGlobalIFuncUsersAsGlobalCtor(M
, {});
26 return PreservedAnalyses::none();