hostsupport/hostopenvg/src/sfCompiler.h
author Matt Plumtree <matt.plumtree@nokia.com>
Wed, 06 Oct 2010 17:59:01 +0100
branchbug235_bringup_0
changeset 53 c2ef9095503a
parent 24 holdingarea/vg/2D_OpenVG_1_1_SF/ri/src/sfCompiler.h@a3f46bb01be2
permissions -rw-r--r--
Copy code from the holdingarea into the target locations. Some initial rework of CMakeLists.txt files, but not yet tested.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
24
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
     1
/* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
     2
 *
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
     3
 * Permission is hereby granted, free of charge, to any person obtaining a
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
     4
 * copy of this software and /or associated documentation files
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
     5
 * (the "Materials "), to deal in the Materials without restriction,
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
     6
 * including without limitation the rights to use, copy, modify, merge,
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
     7
 * publish, distribute, sublicense, and/or sell copies of the Materials,
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
     8
 * and to permit persons to whom the Materials are furnished to do so,
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
     9
 * subject to the following conditions:
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
    10
 *
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
    11
 * The above copyright notice and this permission notice shall be included
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
    12
 * in all copies or substantial portions of the Materials.
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
    13
 *
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
    14
 * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
    15
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
    16
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
    17
 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
    18
 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
    19
 * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE MATERIALS OR
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
    20
 * THE USE OR OTHER DEALINGS IN THE MATERIALS.
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
    21
 */
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
    22
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
    23
#ifndef __SFCOMPILER_H
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
    24
#define __SFCOMPILER_H
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
    25
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
    26
#include <string>
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
    27
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
    28
#ifndef __SFDYNAMICPIXELPIPE_H
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
    29
#   include "sfDynamicPixelPipe.h"
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
    30
#endif
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
    31
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
    32
#ifndef __SFDYNAMICBLITTER_H
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
    33
#   include "sfDynamicBlitter.h"
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
    34
#endif
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
    35
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
    36
#ifndef __RIPIXELPIPE_H
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
    37
#   include "riPixelPipe.h"
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
    38
#endif
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
    39
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
    40
#ifndef __SFFUNCTIONCACHE_H
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
    41
#   include "sfFunctionCache.h"
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
    42
#endif
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
    43
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
    44
#include "llvm/LLVMContext.h"
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
    45
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
    46
// \note PPCompiler class also caches a certain amount of compiled functions.
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
    47
// It may make sense to move the cache into a separate container.
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
    48
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
    49
// LLVM forward declarations
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
    50
namespace llvm { 
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
    51
    class Type;
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
    52
    class Constant;
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
    53
    class Function;
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
    54
    class Module;
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
    55
    class ExecutionEngine;
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
    56
}
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
    57
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
    58
namespace OpenVGRI {
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
    59
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
    60
// Pixel-pipeline function with constant state removed:
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
    61
typedef void (*PixelPipeFunction)(const PixelPipe::PPUniforms&, PixelPipe::PPVariants&, const Span*, int);
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
    62
// Image-blitting function with constant state removed:
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
    63
typedef void (*BlitterFunction)(const DynamicBlitter::BlitUniforms&);
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
    64
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
    65
class PPCompiler
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
    66
{
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
    67
public:
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
    68
    typedef int PixelPipeHandle;
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
    69
    typedef int BlitterHandle;
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
    70
private:
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
    71
    // Function that generates LLVM-constant from a pixel-pipeline:
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
    72
    typedef ::llvm::Constant* (*ConstantGenFunc)(const void* structure, ::llvm::LLVMContext& llvmContext, const ::llvm::Type* structType);
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
    73
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
    74
    struct PPCompilerContext {
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
    75
        PPCompilerContext();
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
    76
        ~PPCompilerContext();
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
    77
        // Stores persistent objects related to each component (pixelpipe or blitter).
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
    78
        // Note that the execution engine must be a per-process singleton for LLVM before
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
    79
        // version 2.7!
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
    80
        ::llvm::Module* module;
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
    81
        ::llvm::Function* llvmFunction; 
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
    82
    };
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
    83
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
    84
    struct PartialEvalFunc
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
    85
    {
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
    86
        ::llvm::Function*   llvmFunc;
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
    87
        ::llvm::GlobalVariable*   llvmConst;
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
    88
    };
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
    89
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
    90
public:
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
    91
    PPCompiler();
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
    92
    ~PPCompiler();
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
    93
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
    94
    static PartialEvalFunc compilePixelPipeline(::llvm::LLVMContext& llvmContext, PPCompilerContext& compilerContext, ConstantGenFunc constGenFunc, const void* state, const std::string& newFuntionName);
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
    95
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
    96
    // These functions get an reserve a handle to a pixelpipe/blitter. MUST use release
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
    97
    // after done with the function.
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
    98
    PixelPipeHandle     compilePixelPipeline(const PixelPipe::SignatureState& state);
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
    99
    BlitterHandle       compileBlitter(const DynamicBlitter::BlitSignatureState& state);
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
   100
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
   101
    PixelPipeFunction   getPixelPipePtr(PixelPipeHandle handle);
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
   102
    BlitterFunction     getBlitterPtr(BlitterHandle handle);
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
   103
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
   104
    void releasePixelPipeline(PixelPipeHandle handle);
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
   105
    void releaseBlitter(BlitterHandle handle);
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
   106
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
   107
    bool init();
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
   108
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
   109
    // It seems that under VS, the static init order is not correct so the compiler has to be created
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
   110
    // during run-time.
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
   111
    static PPCompiler&  getCompiler() { if(!s_compiler) { s_compiler = new PPCompiler(); } return *s_compiler; }
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
   112
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
   113
private:
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
   114
    bool initPPContext(PPCompilerContext& context, const unsigned char* data, size_t dataSize, const char* functionName);
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
   115
    //void* compileRenderingFunction(const void* signatureState, RenderingFunctionType type);
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
   116
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
   117
    static ::llvm::Constant* createConstantStruct(const void* structure, size_t structureSize, ::llvm::LLVMContext& llvmContext, const ::llvm::Type* structType);
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
   118
    static ::llvm::Constant* createPPConstant(const void* signatureState, ::llvm::LLVMContext& llvmContext, const ::llvm::Type* structType);
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
   119
    static ::llvm::Constant* createBlitterConstant(const void* signatureState, ::llvm::LLVMContext& llvmContext, const ::llvm::Type* structType);
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
   120
    static ::llvm::Function* findFunctionWithString(::llvm::Module* module, const char* namepart);
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
   121
    static void llvmCheckPtrError(const void* ptr, std::string& err);
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
   122
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
   123
    static std::string stringOfArray(const RIuint32* arr, int nElems);
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
   124
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
   125
private:
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
   126
    //::llvm::LLVMContext& getLLVMContext() { return ::llvm::getGlobalContext(); }
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
   127
    ::llvm::LLVMContext& getLLVMContext() { return m_llvmContext; }
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
   128
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
   129
    // The order is important atm. because llvm context must be destroyed last:
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
   130
    //::llvm::LLVMContext& m_llvmContext;
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
   131
    PPCompilerContext m_blitterContext;
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
   132
    PPCompilerContext m_ppContext;
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
   133
    ::llvm::ExecutionEngine* m_executionEngine;
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
   134
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
   135
    // \note Loading a system with LLVM already consumes a lot of memory, so
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
   136
    // the amount of cached functions can be grown substantially depending on
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
   137
    // requirements.
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
   138
    enum { NUM_CACHED_PIXELPIPES = 64 };
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
   139
    enum { NUM_CACHED_BLITTERS = NUM_CACHED_PIXELPIPES };
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
   140
    
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
   141
    FunctionCache<PixelPipeHash> m_ppCache;
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
   142
    FunctionCache<BlitterHash> m_blitterCache;
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
   143
    typedef FunctionCache<PixelPipeHash>::EntryHandle PixelPipeEntryHandle;
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
   144
    typedef FunctionCache<BlitterHash>::EntryHandle BlitterEntryHandle;
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
   145
    //std::vector<CacheEntry<BlitterHash> > blitterCache;
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
   146
    
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
   147
    ::llvm::LLVMContext m_llvmContext;
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
   148
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
   149
    static PPCompiler* s_compiler;
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
   150
};
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
   151
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
   152
}
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
   153
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
   154
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
   155
#endif
a3f46bb01be2 Fix line endings
Faisal Memon <faisal.memon@nokia.com>
parents: 20
diff changeset
   156