Realm
A distributed, event-based tasking library
Loading...
Searching...
No Matches
llvmjit.h
Go to the documentation of this file.
1/*
2 * Copyright 2025 Stanford University, NVIDIA Corporation
3 * SPDX-License-Identifier: Apache-2.0
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17
18#ifndef LLVMJIT_H
19#define LLVMJIT_H
20
21// NOTE: let's try to keep LLVM include files/etc. out of here, because they bring
22// a bunch of C++11 baggage
23
24#include "realm/realm_config.h"
25#include "realm/codedesc.h"
26#include "realm/bytearray.h"
27
28#include <string>
29
30namespace Realm {
31
32#ifdef REALM_ALLOW_MISSING_LLVM_LIBS
33 namespace LLVMJit {
34 extern bool llvmjit_available;
35 };
36#endif
37
38 // a code implementation that handles LLVM IR - text only right now, but the plan
39 // is to support binary here too
40
42 public:
43 LLVMIRImplementation(const void *irdata, size_t irlen,
44 const std::string &_entry_symbol);
45
46 virtual ~LLVMIRImplementation(void);
47
48 virtual CodeImplementation *clone(void) const;
49
50 virtual bool is_portable(void) const;
51
52 template <typename S>
53 bool serialize(S &serializer) const;
54
55 template <typename S>
56 static CodeImplementation *deserialize_new(S &deserializer);
57
58 protected:
60
64
65 virtual void print(std::ostream &os) const;
66
67 public:
69 std::string entry_symbol;
70 };
71
72}; // namespace Realm
73
74#include "realm/llvmjit/llvmjit.inl"
75
76#endif
Definition bytearray.h:53
Definition codedesc.h:317
Definition llvmjit.h:41
virtual ~LLVMIRImplementation(void)
LLVMIRImplementation(const void *irdata, size_t irlen, const std::string &_entry_symbol)
ByteArray ir
Definition llvmjit.h:68
virtual bool is_portable(void) const
bool serialize(S &serializer) const
static CodeImplementation * deserialize_new(S &deserializer)
virtual void print(std::ostream &os) const
static Serialization::PolymorphicSerdezSubclass< CodeImplementation, LLVMIRImplementation > serdez_subclass
Definition llvmjit.h:63
virtual CodeImplementation * clone(void) const
std::string entry_symbol
Definition llvmjit.h:69
#define REALM_PUBLIC_API
Definition compiler_support.h:217
Definition activemsg.h:38