LLVM API Documentation

Target.h File Reference

#include "llvm-c/Core.h"
#include "llvm/Config/config.h"
#include "llvm/Config/Targets.def"

Include dependency graph for Target.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define LLVM_TARGET(TargetName)   void LLVMInitialize##TargetName##TargetInfo();
#define LLVM_TARGET(TargetName)   void LLVMInitialize##TargetName##Target();
#define LLVM_TARGET(TargetName)   LLVMInitialize##TargetName##TargetInfo();
#define LLVM_TARGET(TargetName)   LLVMInitialize##TargetName##Target();
#define DoInit2(TARG)
#define DoInit(T)   DoInit2(T)

Typedefs

typedef int LLVMByteOrdering
typedef struct
LLVMOpaqueTargetData * 
LLVMTargetDataRef
typedef struct LLVMStructLayout * LLVMStructLayoutRef

Enumerations

enum  { LLVMBigEndian, LLVMLittleEndian }

Functions

static void LLVMInitializeAllTargetInfos ()
static void LLVMInitializeAllTargets ()
static int LLVMInitializeNativeTarget ()
LLVMTargetDataRef LLVMCreateTargetData (const char *StringRep)
void LLVMAddTargetData (LLVMTargetDataRef, LLVMPassManagerRef)
char * LLVMCopyStringRepOfTargetData (LLVMTargetDataRef)
LLVMByteOrdering LLVMByteOrder (LLVMTargetDataRef)
unsigned LLVMPointerSize (LLVMTargetDataRef)
LLVMTypeRef LLVMIntPtrType (LLVMTargetDataRef)
unsigned long long LLVMSizeOfTypeInBits (LLVMTargetDataRef, LLVMTypeRef)
unsigned long long LLVMStoreSizeOfType (LLVMTargetDataRef, LLVMTypeRef)
unsigned long long LLVMABISizeOfType (LLVMTargetDataRef, LLVMTypeRef)
unsigned LLVMABIAlignmentOfType (LLVMTargetDataRef, LLVMTypeRef)
unsigned LLVMCallFrameAlignmentOfType (LLVMTargetDataRef, LLVMTypeRef)
unsigned LLVMPreferredAlignmentOfType (LLVMTargetDataRef, LLVMTypeRef)
unsigned LLVMPreferredAlignmentOfGlobal (LLVMTargetDataRef, LLVMValueRef GlobalVar)
unsigned LLVMElementAtOffset (LLVMTargetDataRef, LLVMTypeRef StructTy, unsigned long long Offset)
unsigned long long LLVMOffsetOfElement (LLVMTargetDataRef, LLVMTypeRef StructTy, unsigned Element)
void LLVMInvalidateStructLayout (LLVMTargetDataRef, LLVMTypeRef StructTy)
void LLVMDisposeTargetData (LLVMTargetDataRef)


Define Documentation

#define DoInit ( T   )     DoInit2(T)

#define DoInit2 ( TARG   ) 

Value:

LLVMInitialize ## TARG ## Info ();          \
  LLVMInitialize ## TARG ()

#define LLVM_TARGET ( TargetName   )     LLVMInitialize##TargetName##Target();

Definition at line 39 of file Target.h.

#define LLVM_TARGET ( TargetName   )     LLVMInitialize##TargetName##TargetInfo();

Definition at line 39 of file Target.h.

#define LLVM_TARGET ( TargetName   )     void LLVMInitialize##TargetName##Target();

Definition at line 39 of file Target.h.

#define LLVM_TARGET ( TargetName   )     void LLVMInitialize##TargetName##TargetInfo();

Definition at line 39 of file Target.h.


Typedef Documentation

typedef int LLVMByteOrdering

Definition at line 30 of file Target.h.

typedef struct LLVMStructLayout* LLVMStructLayoutRef

Definition at line 33 of file Target.h.

typedef struct LLVMOpaqueTargetData* LLVMTargetDataRef

Definition at line 32 of file Target.h.


Enumeration Type Documentation

anonymous enum

Enumerator:
LLVMBigEndian 
LLVMLittleEndian 

Definition at line 29 of file Target.h.


Function Documentation

unsigned LLVMABIAlignmentOfType ( LLVMTargetDataRef  ,
LLVMTypeRef   
)

Computes the ABI alignment of a type in bytes for a target. See the method llvm::TargetData::getTypeABISize.

Definition at line 59 of file Target.cpp.

unsigned long long LLVMABISizeOfType ( LLVMTargetDataRef  ,
LLVMTypeRef   
)

Computes the ABI size of a type in bytes for a target. See the method llvm::TargetData::getTypeAllocSize.

Definition at line 55 of file Target.cpp.

void LLVMAddTargetData ( LLVMTargetDataRef  ,
LLVMPassManagerRef   
)

Adds target data information to a pass manager. This does not take ownership of the target data. See the method llvm::PassManagerBase::add.

Definition at line 26 of file Target.cpp.

LLVMByteOrdering LLVMByteOrder ( LLVMTargetDataRef   ) 

Returns the byte order of a target, either LLVMBigEndian or LLVMLittleEndian. See the method llvm::TargetData::isLittleEndian.

Definition at line 35 of file Target.cpp.

unsigned LLVMCallFrameAlignmentOfType ( LLVMTargetDataRef  ,
LLVMTypeRef   
)

Computes the call frame alignment of a type in bytes for a target. See the method llvm::TargetData::getTypeABISize.

Definition at line 63 of file Target.cpp.

char* LLVMCopyStringRepOfTargetData ( LLVMTargetDataRef   ) 

Converts target data to a target layout string. The string must be disposed with LLVMDisposeMessage. See the constructor llvm::TargetData::TargetData.

Definition at line 30 of file Target.cpp.

LLVMTargetDataRef LLVMCreateTargetData ( const char *  StringRep  ) 

Creates target data from a target layout string. See the constructor llvm::TargetData::TargetData.

Definition at line 22 of file Target.cpp.

void LLVMDisposeTargetData ( LLVMTargetDataRef   ) 

Deallocates a TargetData. See the destructor llvm::TargetData::~TargetData.

Definition at line 92 of file Target.cpp.

unsigned LLVMElementAtOffset ( LLVMTargetDataRef  ,
LLVMTypeRef  StructTy,
unsigned long long  Offset 
)

Computes the structure element that contains the byte offset for a target. See the method llvm::StructLayout::getElementContainingOffset.

Definition at line 76 of file Target.cpp.

static void LLVMInitializeAllTargetInfos (  )  [inline, static]

LLVMInitializeAllTargetInfos - The main program should call this function if it wants access to all available targets that LLVM is configured to support.

Definition at line 45 of file Target.h.

static void LLVMInitializeAllTargets (  )  [inline, static]

LLVMInitializeAllTargets - The main program should call this function if it wants to link in all available targets that LLVM is configured to support.

Definition at line 53 of file Target.h.

static int LLVMInitializeNativeTarget (  )  [inline, static]

LLVMInitializeNativeTarget - The main program should call this function to initialize the native target corresponding to the host. This is useful for JIT applications to ensure that the target gets linked in correctly.

Definition at line 61 of file Target.h.

References DoInit, and LLVM_NATIVE_ARCH.

LLVMTypeRef LLVMIntPtrType ( LLVMTargetDataRef   ) 

Returns the integer type that is the same size as a pointer on a target. See the method llvm::TargetData::getIntPtrType.

Definition at line 43 of file Target.cpp.

References llvm::getGlobalContext().

void LLVMInvalidateStructLayout ( LLVMTargetDataRef  ,
LLVMTypeRef  StructTy 
)

Struct layouts are speculatively cached. If a TargetDataRef is alive when types are being refined and removed, this method must be called whenever a struct type is removed to avoid a dangling pointer in this cache. See the method llvm::TargetData::InvalidateStructLayoutInfo.

Definition at line 88 of file Target.cpp.

unsigned long long LLVMOffsetOfElement ( LLVMTargetDataRef  ,
LLVMTypeRef  StructTy,
unsigned  Element 
)

Computes the byte offset of the indexed struct element for a target. See the method llvm::StructLayout::getElementContainingOffset.

Definition at line 82 of file Target.cpp.

unsigned LLVMPointerSize ( LLVMTargetDataRef   ) 

Returns the pointer size in bytes for a target. See the method llvm::TargetData::getPointerSize.

Definition at line 39 of file Target.cpp.

unsigned LLVMPreferredAlignmentOfGlobal ( LLVMTargetDataRef  ,
LLVMValueRef  GlobalVar 
)

Computes the preferred alignment of a global variable in bytes for a target. See the method llvm::TargetData::getPreferredAlignment.

Definition at line 71 of file Target.cpp.

unsigned LLVMPreferredAlignmentOfType ( LLVMTargetDataRef  ,
LLVMTypeRef   
)

Computes the preferred alignment of a type in bytes for a target. See the method llvm::TargetData::getTypeABISize.

Definition at line 67 of file Target.cpp.

unsigned long long LLVMSizeOfTypeInBits ( LLVMTargetDataRef  ,
LLVMTypeRef   
)

Computes the size of a type in bytes for a target. See the method llvm::TargetData::getTypeSizeInBits.

Definition at line 47 of file Target.cpp.

unsigned long long LLVMStoreSizeOfType ( LLVMTargetDataRef  ,
LLVMTypeRef   
)

Computes the storage size of a type in bytes for a target. See the method llvm::TargetData::getTypeStoreSize.

Definition at line 51 of file Target.cpp.