clang 24.0.0git
clang::OffloadTargetInfo Struct Reference

Obtain the offload kind, real machine triple, and an optional TargetID out of the target information specified by the user. More...

#include "clang/Driver/OffloadBundler.h"

Public Member Functions

 OffloadTargetInfo (const llvm::StringRef Target, const OffloadBundlerConfig &BC)
bool hasHostKind () const
bool isOffloadKindValid () const
bool isOffloadKindCompatible (const llvm::StringRef TargetOffloadKind) const
bool isTripleValid () const
bool operator== (const OffloadTargetInfo &Target) const
std::string str () const

Public Attributes

llvm::StringRef OffloadKind
llvm::Triple Triple
llvm::StringRef TargetID
const OffloadBundlerConfig & BundlerConfig

Detailed Description

Obtain the offload kind, real machine triple, and an optional TargetID out of the target information specified by the user.

Bundle Entry ID (or, Offload Target String) has following components:

  • Offload Kind - Host, OpenMP, or HIP
  • Triple - Standard LLVM Triple
  • TargetID (Optional) - target ID, like gfx906:xnack+ or sm_30

Definition at line 78 of file OffloadBundler.h.

Constructor & Destructor Documentation

◆ OffloadTargetInfo()

OffloadTargetInfo::OffloadTargetInfo ( const llvm::StringRef Target,
const OffloadBundlerConfig & BC )

Definition at line 72 of file OffloadBundler.cpp.

References BundlerConfig, OffloadKind, clang::StringToOffloadArch(), clang::Target, TargetID, and Triple.

Referenced by operator==().

Member Function Documentation

◆ hasHostKind()

bool OffloadTargetInfo::hasHostKind ( ) const

Definition at line 96 of file OffloadBundler.cpp.

References OffloadKind.

◆ isOffloadKindCompatible()

bool OffloadTargetInfo::isOffloadKindCompatible ( const llvm::StringRef TargetOffloadKind) const

Definition at line 105 of file OffloadBundler.cpp.

References BundlerConfig, and OffloadKind.

Referenced by isCodeObjectCompatible().

◆ isOffloadKindValid()

bool OffloadTargetInfo::isOffloadKindValid ( ) const

Definition at line 100 of file OffloadBundler.cpp.

References OffloadKind.

◆ isTripleValid()

bool OffloadTargetInfo::isTripleValid ( ) const

Definition at line 123 of file OffloadBundler.cpp.

References Triple.

◆ operator==()

bool OffloadTargetInfo::operator== ( const OffloadTargetInfo & Target) const

Definition at line 127 of file OffloadBundler.cpp.

References OffloadKind, OffloadTargetInfo(), clang::Target, TargetID, and Triple.

◆ str()

std::string OffloadTargetInfo::str ( ) const

Definition at line 132 of file OffloadBundler.cpp.

References OffloadKind, TargetID, and Triple.

Referenced by isCodeObjectCompatible().

Member Data Documentation

◆ BundlerConfig

const OffloadBundlerConfig& clang::OffloadTargetInfo::BundlerConfig

Definition at line 83 of file OffloadBundler.h.

Referenced by isOffloadKindCompatible(), and OffloadTargetInfo().

◆ OffloadKind

llvm::StringRef clang::OffloadTargetInfo::OffloadKind

◆ TargetID

llvm::StringRef clang::OffloadTargetInfo::TargetID

Definition at line 81 of file OffloadBundler.h.

Referenced by isCodeObjectCompatible(), OffloadTargetInfo(), operator==(), and str().

◆ Triple

llvm::Triple clang::OffloadTargetInfo::Triple

The documentation for this struct was generated from the following files: