[CostModel][X86] Attempt to match v4f32 shuffles that map to MOVSS/INSERTPS instruction
[llvm-project.git] / llvm / lib / Transforms / Utils / LowerIFunc.cpp
blob18ae0bbe2e731afa131b194dff93ac0b33a69ff8
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.
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"
18 using namespace llvm;
20 /// Replace all call users of ifuncs in the module.
21 PreservedAnalyses LowerIFuncPass::run(Module &M, ModuleAnalysisManager &AM) {
22 if (M.ifunc_empty())
23 return PreservedAnalyses::all();
25 lowerGlobalIFuncUsersAsGlobalCtor(M, {});
26 return PreservedAnalyses::none();