forked from secure-software-engineering/phasar
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCompressor.h
More file actions
40 lines (30 loc) · 979 Bytes
/
Compressor.h
File metadata and controls
40 lines (30 loc) · 979 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#ifndef PHASAR_DATAFLOW_IFDSIDE_SOLVER_COMPRESSOR_H
#define PHASAR_DATAFLOW_IFDSIDE_SOLVER_COMPRESSOR_H
#include "phasar/Utils/ByRef.h"
#include "phasar/Utils/Compressor.h"
#include <cstdint>
#include <type_traits>
namespace psr {
class LLVMProjectIRDB;
/// Once we have fast instruction IDs (as we already have in IntelliSecPhasar),
/// we might want to create a specialization for T/const llvm::Value * that uses
/// the IDs from the IRDB
template <typename T> struct NodeCompressorTraits {
using type = Compressor<T>;
static type
create(const LLVMProjectIRDB * /*IRDB*/) noexcept(noexcept(type())) {
return type();
}
};
template <typename T> struct ValCompressorTraits {
using type = Compressor<T>;
using id_type = uint32_t;
};
template <typename T>
requires CanEfficientlyPassByValue<T>
struct ValCompressorTraits<T> {
using type = NoneCompressor;
using id_type = T;
};
} // namespace psr
#endif // PHASAR_DATAFLOW_IFDSIDE_SOLVER_COMPRESSOR_H