clang  3.9.0
CGOpenCLRuntime.h
Go to the documentation of this file.
1 //===----- CGOpenCLRuntime.h - Interface to OpenCL Runtimes -----*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This provides an abstract class for OpenCL code generation. Concrete
11 // subclasses of this implement code generation for specific OpenCL
12 // runtime libraries.
13 //
14 //===----------------------------------------------------------------------===//
15 
16 #ifndef LLVM_CLANG_LIB_CODEGEN_CGOPENCLRUNTIME_H
17 #define LLVM_CLANG_LIB_CODEGEN_CGOPENCLRUNTIME_H
18 
19 #include "clang/AST/Type.h"
20 #include "llvm/IR/Type.h"
21 #include "llvm/IR/Value.h"
22 
23 namespace clang {
24 
25 class VarDecl;
26 
27 namespace CodeGen {
28 
29 class CodeGenFunction;
30 class CodeGenModule;
31 
33 protected:
36 
37 public:
38  CGOpenCLRuntime(CodeGenModule &CGM) : CGM(CGM), PipeTy(nullptr) {}
39  virtual ~CGOpenCLRuntime();
40 
41  /// Emit the IR required for a work-group-local variable declaration, and add
42  /// an entry to CGF's LocalDeclMap for D. The base class does this using
43  /// CodeGenFunction::EmitStaticVarDecl to emit an internal global for D.
45  const VarDecl &D);
46 
47  virtual llvm::Type *convertOpenCLSpecificType(const Type *T);
48 
49  virtual llvm::Type *getPipeType();
50 };
51 
52 }
53 }
54 
55 #endif
C Language Family Type Representation.
The base class of the type hierarchy.
Definition: Type.h:1281
VarDecl - An instance of this class is created to represent a variable declaration or definition...
Definition: Decl.h:768
CodeGenFunction - This class organizes the per-function state that is used while generating LLVM code...
virtual llvm::Type * convertOpenCLSpecificType(const Type *T)
virtual void EmitWorkGroupLocalVarDecl(CodeGenFunction &CGF, const VarDecl &D)
Emit the IR required for a work-group-local variable declaration, and add an entry to CGF's LocalDecl...
The l-value was considered opaque, so the alignment was determined from a type.
CGOpenCLRuntime(CodeGenModule &CGM)
This class organizes the cross-function state that is used while generating LLVM code.
virtual llvm::Type * getPipeType()