source: icGREP/icgrep-devel/icgrep/pablo/symbol_generator.h @ 5400

Last change on this file since 5400 was 5285, checked in by nmedfort, 3 years ago

Start of work to simplify kernel writing. Removed generateDoBlockLogic method.

File size: 1.2 KB
RevLine 
[3850]1/*
2 *  Copyright (c) 2014 International Characters.
3 *  This software is licensed to the public under the Open Software License 3.0.
4 *  icgrep is a trademark of International Characters.
5 */
6
7#ifndef SYMBOL_GENERATOR_H
8#define SYMBOL_GENERATOR_H
9
[4404]10#include <pablo/pabloAST.h>
[5283]11#include <llvm/ADT/StringMap.h>
12#include <boost/container/flat_map.hpp>
[3850]13
[5267]14namespace IDISA { class IDISA_Builder; }
15namespace pablo { class String; }
16namespace pablo { class Integer; }
[5217]17
[4210]18namespace pablo {
[3850]19
[4404]20class SymbolGenerator {
[5283]21    friend class PabloKernel;
[5230]22    using Allocator = PabloAST::Allocator;
[3850]23public:
[5283]24    using IntTy = int64_t;
25    String * makeString(const llvm::StringRef prefix, IDISA::IDISA_Builder * builder) noexcept;
26    Integer * getInteger(const IntTy value, IDISA::IDISA_Builder * builder) noexcept;
27    ~SymbolGenerator() { }
28protected:
29    SymbolGenerator(Allocator & allocator) : mAllocator(allocator) { }
[3850]30private:
[5283]31    Allocator &                                  mAllocator;
32    llvm::StringMap<IntTy>                       mPrefixMap;
33    llvm::StringMap<String *>                    mStringMap;
34    boost::container::flat_map<IntTy, Integer *> mIntegerMap;
[3850]35};
36
[5283]37
[4197]38}
39
[3850]40#endif // SYMBOL_GENERATOR_H
Note: See TracBrowser for help on using the repository browser.