LLVM 24.0.0git
LibcallLoweringInfo.cpp
Go to the documentation of this file.
1//===- LibcallLoweringInfo.cpp - Legacy wrapper for libcall lowering ------===//
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
13
14using namespace llvm;
15
18 const TargetSubtargetInfo &Subtarget) {
19 return ModuleInfo.getLibcallLowering(
20 &Subtarget, [&](LibcallLoweringInfo &Info) {
21 Subtarget.initLibcallLoweringInfo(Info);
22 });
23}
24
26 "Library Function Lowering Analysis", false, true)
29 "Library Function Lowering Analysis", false, true)
30
32
34
36 const Module &M, const TargetSubtargetInfo &Subtarget) {
38 &Subtarget, [&](LibcallLoweringInfo &Info) {
39 Subtarget.initLibcallLoweringInfo(Info);
40 });
41}
42
45 if (!Result)
46 Result.init(&RuntimeLibcallsWrapper->getRTLCI(M));
47 return Result;
48}
49
53
58
60
#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
Represent the analysis usage information of a pass.
AnalysisUsage & addRequired()
void setPreservesAll()
Set by analyses that do not transform their input at all.
ImmutablePass(char &pid)
Definition Pass.h:287
const ModuleLibcallLoweringInfo & getResult(const Module &M)
const LibcallLoweringInfo & getLibcallLowering(const Module &M, const TargetSubtargetInfo &Subtarget)
void initializePass() override
initializePass - This method may be overriden by immutable passes to allow them to perform various in...
void releaseMemory() override
releaseMemory() - This member can be implemented by a pass if it wants to be able to release its memo...
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - This function should be overriden by passes that need analysis information to do t...
Tracks which library functions to use for a particular subtarget or function.
Records a mapping from an opaque lowering context to its LibcallLoweringInfo.
void init(const RTLIB::RuntimeLibcallsInfo *RT)
const LibcallLoweringInfo & getLibcallLowering(const KeyT *Key, LibcallLoweringInfo::ApplyContextRulesFn ApplyContextRules={}) const
Return the LibcallLoweringInfo for the context identified by Key, creating it (via ApplyContextRules)...
ModulePass class - This class is used to implement unstructured interprocedural optimizations and ana...
Definition Pass.h:255
A Module instance is used to store all the information related to an LLVM module.
Definition Module.h:67
AnalysisType & getAnalysis() const
getAnalysis<AnalysisType>() - This function is used by subclasses to get to the analysis information ...
TargetSubtargetInfo - Generic base class for all target subtargets.
virtual void initLibcallLoweringInfo(LibcallLoweringInfo &Info) const
Configure the LibcallLoweringInfo for this subtarget.
This is an optimization pass for GlobalISel generic memory operations.
LLVM_ABI ModulePass * createLibcallLoweringInfoWrapper()
LLVM_ABI const LibcallLoweringInfo & getLibcallLowering(const ModuleLibcallLoweringInfo &ModuleInfo, const TargetSubtargetInfo &Subtarget)
Resolve the LibcallLoweringInfo for Subtarget from the module-level ModuleInfo, applying the subtarge...