Ignore:
Timestamp:
Dec 19, 2016, 2:39:35 PM (2 years ago)
Author:
nmedfort
Message:

Multi-threading support for PabloAST / PabloCompiler?. Requires unique LLVM Context / Module for each thread.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/pablo/expression_map.hpp

    r5202 r5230  
    9898    friend struct ExpressionTable;
    9999
    100     using Allocator = LLVMAllocator;
     100    using Allocator = SlabAllocator<const PabloAST *>;
    101101
    102102    struct Key {
     
    105105        : mType(type)
    106106        , mArgs(1 + args.size())
    107         , mArg(allocator.Allocate<const PabloAST *>(mArgs)) {
     107        , mArg(allocator.allocate(mArgs)) {
    108108            unsigned i = 1;
    109109            mArg[0] = arg1;
     
    116116        : mType(type)
    117117        , mArgs(stmt->getNumOperands())
    118         , mArg(allocator.Allocate<const PabloAST *>(mArgs)) {
     118        , mArg(allocator.allocate(mArgs)) {
    119119            unsigned i = 0;
    120120            for (PabloAST * arg : *stmt) {
     
    170170        PabloAST * const f = find(key);
    171171        if (f) {
    172             mAllocator.Deallocate<const PabloAST *>(key.mArg);
     172            mAllocator.deallocate(key.mArg);
    173173            return f;
    174174        }
     
    182182        PabloAST * const entry = find(key);
    183183        if (entry) {
    184             mAllocator.Deallocate<const PabloAST *>(key.mArg);
     184            mAllocator.deallocate(key.mArg);
    185185            return std::make_pair(entry, false);
    186186        }
Note: See TracChangeset for help on using the changeset viewer.