mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-30 17:33:24 +00:00
ff7dcc527f
This also fixes a bug in the annotation cache where the cache will not be cleared between modules if multiple modules are compiled in the same process. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205905 91177308-0d34-0410-b5e6-96231b3b80d8
90 lines
3.0 KiB
C++
90 lines
3.0 KiB
C++
//===-- NVPTXBaseInfo.h - Top-level definitions for NVPTX -------*- C++ -*-===//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is distributed under the University of Illinois Open Source
|
|
// License. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
// This file contains small standalone helper functions and enum definitions for
|
|
// the NVPTX target useful for the compiler back-end and the MC libraries.
|
|
// As such, it deliberately does not include references to LLVM core
|
|
// code gen types, passes, etc..
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#ifndef NVPTXBASEINFO_H
|
|
#define NVPTXBASEINFO_H
|
|
|
|
namespace llvm {
|
|
|
|
enum AddressSpace {
|
|
ADDRESS_SPACE_GENERIC = 0,
|
|
ADDRESS_SPACE_GLOBAL = 1,
|
|
ADDRESS_SPACE_SHARED = 3,
|
|
ADDRESS_SPACE_CONST = 4,
|
|
ADDRESS_SPACE_LOCAL = 5,
|
|
|
|
// NVVM Internal
|
|
ADDRESS_SPACE_PARAM = 101
|
|
};
|
|
|
|
enum PropertyAnnotation {
|
|
PROPERTY_MAXNTID_X = 0,
|
|
PROPERTY_MAXNTID_Y,
|
|
PROPERTY_MAXNTID_Z,
|
|
PROPERTY_REQNTID_X,
|
|
PROPERTY_REQNTID_Y,
|
|
PROPERTY_REQNTID_Z,
|
|
PROPERTY_MINNCTAPERSM,
|
|
PROPERTY_ISTEXTURE,
|
|
PROPERTY_ISSURFACE,
|
|
PROPERTY_ISSAMPLER,
|
|
PROPERTY_ISREADONLY_IMAGE_PARAM,
|
|
PROPERTY_ISWRITEONLY_IMAGE_PARAM,
|
|
PROPERTY_ISREADWRITE_IMAGE_PARAM,
|
|
PROPERTY_ISKERNEL_FUNCTION,
|
|
PROPERTY_ALIGN,
|
|
PROPERTY_MANAGED,
|
|
|
|
// last property
|
|
PROPERTY_LAST
|
|
};
|
|
|
|
const unsigned AnnotationNameLen = 9; // length of each annotation name
|
|
const char PropertyAnnotationNames[PROPERTY_LAST + 1][AnnotationNameLen + 1] = {
|
|
"maxntidx", // PROPERTY_MAXNTID_X
|
|
"maxntidy", // PROPERTY_MAXNTID_Y
|
|
"maxntidz", // PROPERTY_MAXNTID_Z
|
|
"reqntidx", // PROPERTY_REQNTID_X
|
|
"reqntidy", // PROPERTY_REQNTID_Y
|
|
"reqntidz", // PROPERTY_REQNTID_Z
|
|
"minctasm", // PROPERTY_MINNCTAPERSM
|
|
"texture", // PROPERTY_ISTEXTURE
|
|
"surface", // PROPERTY_ISSURFACE
|
|
"sampler", // PROPERTY_ISSAMPLER
|
|
"rdoimage", // PROPERTY_ISREADONLY_IMAGE_PARAM
|
|
"wroimage", // PROPERTY_ISWRITEONLY_IMAGE_PARAM
|
|
"rdwrimage", // PROPERTY_ISREADWRITE_IMAGE_PARAM
|
|
"kernel", // PROPERTY_ISKERNEL_FUNCTION
|
|
"align", // PROPERTY_ALIGN
|
|
"managed", // PROPERTY_MANAGED
|
|
|
|
// last property
|
|
"proplast", // PROPERTY_LAST
|
|
};
|
|
|
|
// name of named metadata used for global annotations
|
|
#if defined(__GNUC__)
|
|
// As this is declared to be static but some of the .cpp files that
|
|
// include NVVM.h do not use this array, gcc gives a warning when
|
|
// compiling those .cpp files, hence __attribute__((unused)).
|
|
__attribute__((unused))
|
|
#endif
|
|
static const char *NamedMDForAnnotations = "nvvm.annotations";
|
|
|
|
}
|
|
|
|
#endif
|