clang 24.0.0git
TargetLoweringInfo.h
Go to the documentation of this file.
1//===---- TargetLoweringInfo.h - Encapsulate target details -----*- 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// This file partially mimics the TargetCodeGenInfo class from the file
10// clang/lib/CodeGen/TargetInfo.h.
11//
12//===----------------------------------------------------------------------===//
13
14#ifndef LLVM_CLANG_LIB_CIR_DIALECT_TRANSFORMS_TARGETLOWERING_TARGETLOWERINGINFO_H
15#define LLVM_CLANG_LIB_CIR_DIALECT_TRANSFORMS_TARGETLOWERING_TARGETLOWERINGINFO_H
16
18#include <memory>
19#include <string>
20
21namespace llvm {
22class Triple;
23} // namespace llvm
24
25namespace cir {
26
28public:
30
31 virtual cir::SyncScopeKind
32 convertSyncScope(cir::SyncScopeKind syncScope) const;
33
34 virtual unsigned
35 getTargetAddrSpaceFromCIRAddrSpace(cir::LangAddressSpace addrSpace) const {
36 return 0;
37 };
38};
39
40/// Select target lowering rules without constructing language or ABI state.
41std::unique_ptr<TargetLoweringInfo>
42createTargetLoweringInfo(const llvm::Triple &triple);
43
44// Target-specific factory functions.
45std::unique_ptr<TargetLoweringInfo> createAMDGPUTargetLoweringInfo();
46
47std::unique_ptr<TargetLoweringInfo> createNVPTXTargetLoweringInfo();
48
49std::unique_ptr<TargetLoweringInfo> createCommonSPIRTargetLoweringInfo();
50
51std::unique_ptr<TargetLoweringInfo> createSPIRVTargetLoweringInfo();
52
53} // namespace cir
54
55#endif
virtual unsigned getTargetAddrSpaceFromCIRAddrSpace(cir::LangAddressSpace addrSpace) const
virtual cir::SyncScopeKind convertSyncScope(cir::SyncScopeKind syncScope) const
std::unique_ptr< TargetLoweringInfo > createCommonSPIRTargetLoweringInfo()
Definition SPIRV.cpp:53
std::unique_ptr< TargetLoweringInfo > createSPIRVTargetLoweringInfo()
Definition SPIRV.cpp:57
std::unique_ptr< TargetLoweringInfo > createTargetLoweringInfo(const llvm::Triple &triple)
Select target lowering rules without constructing language or ABI state.
std::unique_ptr< TargetLoweringInfo > createNVPTXTargetLoweringInfo()
Definition NVPTX.cpp:44
std::unique_ptr< TargetLoweringInfo > createAMDGPUTargetLoweringInfo()
Definition AMDGPU.cpp:50
Diagnostic wrappers for TextAPI types for error reporting.
Definition Dominators.h:30