Proteus
Programmable JIT compilation and optimization for C/C++ using LLVM
Main Page
Namespaces
Classes
Files
File List
File Members
Loading...
Searching...
No Matches
include
proteus
Caching
ObjectCacheChain.hpp
Go to the documentation of this file.
1
//===-- ObjectCacheChain.hpp -- Object cache chain header --===//
2
//
3
// Part of the Proteus Project, under the Apache License v2.0 with LLVM
4
// Exceptions. See https://llvm.org/LICENSE.txt for license information.
5
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
//
7
//===----------------------------------------------------------------------===//
8
//
9
//===----------------------------------------------------------------------===//
10
11
#ifndef PROTEUS_OBJECTCACHECHAIN_HPP
12
#define PROTEUS_OBJECTCACHECHAIN_HPP
13
14
#include <cstdint>
15
#include <memory>
16
#include <string>
17
#include <vector>
18
19
#include <llvm/ADT/SmallString.h>
20
#include <llvm/Support/MemoryBufferRef.h>
21
22
#include "
proteus/Caching/ObjectCache.hpp
"
23
#include "
proteus/CompiledLibrary.hpp
"
24
#include "
proteus/Hashing.hpp
"
25
26
namespace
proteus
{
27
28
using namespace
llvm
;
29
30
class
ObjectCacheChain
{
31
public
:
32
explicit
ObjectCacheChain
(
const
std::string &Label);
33
34
std::unique_ptr<CompiledLibrary>
lookup
(
const
HashT
&HashValue);
35
void
store
(
const
HashT
&HashValue,
const
CacheEntry
&Entry);
36
void
printStats
();
37
38
private
:
39
void
addCache(std::unique_ptr<ObjectCache> Cache);
40
void
buildFromConfig(
const
std::string &ConfigStr);
41
std::unique_ptr<ObjectCache> createCache(
const
std::string &Name);
42
void
promoteToLevel(
const
HashT
&HashValue,
const
CacheEntry
&Entry,
43
size_t
Level);
44
45
std::vector<std::unique_ptr<ObjectCache>> Caches;
46
const
std::string Label;
47
const
std::string DistributedRank;
48
};
49
50
}
// namespace proteus
51
52
#endif
CompiledLibrary.hpp
Hashing.hpp
ObjectCache.hpp
proteus::HashT
Definition
Hashing.hpp:21
proteus::ObjectCacheChain
Definition
ObjectCacheChain.hpp:30
proteus::ObjectCacheChain::printStats
void printStats()
Definition
ObjectCacheChain.cpp:136
proteus::ObjectCacheChain::store
void store(const HashT &HashValue, const CacheEntry &Entry)
Definition
ObjectCacheChain.cpp:128
proteus::ObjectCacheChain::lookup
std::unique_ptr< CompiledLibrary > lookup(const HashT &HashValue)
Definition
ObjectCacheChain.cpp:91
llvm
Definition
Helpers.h:141
proteus
Definition
ObjectCacheChain.cpp:26
proteus::CacheEntry
Definition
ObjectCache.hpp:27
Generated by
1.9.8