blob: 8117a0cda47607d4ecd8157869bc681b2f80bc86 (
plain)
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
|
// SPDX-License-Identifier: GPL-3.0-or-later
#ifndef RCC_TOOLING_BACKENDDRIVER_H
#define RCC_TOOLING_BACKENDDRIVER_H
#include "rcc/CodeGen/MachinePassManager.h"
#include "rcc/Support/Error.h"
#include "rcc/Tooling/ArtifactStore.h"
#include "rcc/Tooling/PipelineDriver.h"
#include <cstdint>
#include <span>
#include <string_view>
#include <vector>
namespace rcc {
class TargetDescription;
namespace tooling {
struct BackendRunResult final {
ArtifactKind Kind = ArtifactKind::FinalMIR;
std::vector<std::uint8_t> Output;
PipelineRunResult Pipeline;
std::vector<MachineActionEvent> Actions;
[[nodiscard]] std::string_view text() const noexcept;
};
[[nodiscard]] Expected<BackendRunResult>
runBackend(CanonicalMIR Input, const TargetDescription &Target, const BackendInvocation &Invocation,
ArtifactKind Output, PipelineControls Controls = {},
MachinePassInstrumentation *Instrumentation = nullptr);
} // namespace tooling
} // namespace rcc
#endif // RCC_TOOLING_BACKENDDRIVER_H
|