Proteus
Programmable JIT compilation and optimization for C/C++ using LLVM
Main Page
Namespaces
Classes
Files
File List
File Members
Loading...
Searching...
No Matches
src
include
proteus
impl
Caching
ObjectCacheChain.h
Go to the documentation of this file.
1
//===-- ObjectCacheChain.h -- 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_H
12
#define PROTEUS_OBJECTCACHECHAIN_H
13
14
#include "
proteus/impl/Caching/ObjectCache.h
"
15
#include "
proteus/impl/CompiledLibrary.h
"
16
#include "
proteus/impl/Hashing.h
"
17
18
#include <llvm/ADT/SmallString.h>
19
#include <llvm/Support/MemoryBufferRef.h>
20
21
#include <cstdint>
22
#include <memory>
23
#include <string>
24
#include <vector>
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
void
finalize
();
38
39
private
:
40
void
addCache(std::unique_ptr<ObjectCache> Cache);
41
void
buildFromConfig(
const
std::string &ConfigStr);
42
std::unique_ptr<ObjectCache> createCache(
const
std::string &Name);
43
void
promoteToLevel(
const
HashT
&HashValue,
const
CacheEntry
&Entry,
44
size_t
Level);
45
46
std::vector<std::unique_ptr<ObjectCache>> Caches;
47
const
std::string Label;
48
const
std::string DistributedRank;
49
};
50
51
}
// namespace proteus
52
53
#endif
CompiledLibrary.h
Hashing.h
ObjectCache.h
proteus::HashT
Definition
Hashing.h:21
proteus::ObjectCacheChain
Definition
ObjectCacheChain.h:30
proteus::ObjectCacheChain::printStats
void printStats()
Definition
ObjectCacheChain.cpp:157
proteus::ObjectCacheChain::store
void store(const HashT &HashValue, const CacheEntry &Entry)
Definition
ObjectCacheChain.cpp:149
proteus::ObjectCacheChain::finalize
void finalize()
Definition
ObjectCacheChain.cpp:165
proteus::ObjectCacheChain::lookup
std::unique_ptr< CompiledLibrary > lookup(const HashT &HashValue)
Definition
ObjectCacheChain.cpp:112
llvm
Definition
CompiledLibrary.h:7
proteus
Definition
MemoryCache.h:26
proteus::CacheEntry
Definition
ObjectCache.h:27
Generated by
1.9.8