LLVM 24.0.0git
RuntimeLibcallInfo.h
Go to the documentation of this file.
1//===-- RuntimeLibcallInfo.h - Runtime library information ------*- 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#ifndef LLVM_ANALYSIS_RUNTIMELIBCALLINFO_H
10#define LLVM_ANALYSIS_RUNTIMELIBCALLINFO_H
11
13#include "llvm/Pass.h"
14#include <optional>
15#include <string>
16
17namespace llvm {
18
20 : public AnalysisInfoMixin<RuntimeLibraryAnalysis> {
21public:
23
27 : ABIName(ABIName.str()), VecLib(VecLib) {}
28
30
31private:
33 static AnalysisKey Key;
34
35 // FIXME: These are TargetOptions values that are not yet represented in the
36 // IR, copied here so run() can forward them to the RuntimeLibcallsInfo Module
37 // constructor. Delete each one as they are migrated to module flags.
38 std::string ABIName;
40};
41
44 std::optional<RTLIB::RuntimeLibcallsInfo> RTLCI;
45
46public:
47 static char ID;
51
53 if (!RTLCI) {
54 ModuleAnalysisManager DummyMAM;
55 RTLCI = RTLA.run(M, DummyMAM);
56 }
57
58 return *RTLCI;
59 }
60
61 void getAnalysisUsage(AnalysisUsage &AU) const override;
62};
63
65
66} // namespace llvm
67
68#endif
#define LLVM_ABI
Definition Compiler.h:215
Represent the analysis usage information of a pass.
ImmutablePass(char &pid)
Definition Pass.h:287
A Module instance is used to store all the information related to an LLVM module.
Definition Module.h:68
RTLIB::RuntimeLibcallsInfo Result
RuntimeLibraryAnalysis(StringRef ABIName, VectorLibrary VecLib=VectorLibrary::NoLibrary)
const RTLIB::RuntimeLibcallsInfo & getRTLCI(const Module &M)
Represent a constant reference to a string, i.e.
Definition StringRef.h:56
This is an optimization pass for GlobalISel generic memory operations.
LLVM_ABI ModulePass * createRuntimeLibraryInfoWrapperPass()
LLVM_ATTRIBUTE_VISIBILITY_DEFAULT AnalysisKey InnerAnalysisManagerProxy< AnalysisManagerT, IRUnitT, ExtraArgTs... >::Key
VectorLibrary
List of known vector-functions libraries.
AnalysisManager< Module > ModuleAnalysisManager
Convenience typedef for the Module analysis manager.
Definition MIRParser.h:39
A CRTP mix-in that provides informational APIs needed for analysis passes.
A special type used by analysis passes to provide an address that identifies that particular analysis...
Definition Analysis.h:29
A simple container for information about the supported runtime calls.