diff options
| author | Richard-Qin-X <richard.qin.001@gmail.com> | 2026-08-13 13:29:50 +0800 |
|---|---|---|
| committer | Richard-Qin-X <richard.qin.001@gmail.com> | 2026-08-13 13:29:50 +0800 |
| commit | 175fdbf4b30eae5e5344cd7fca7e953ca0b2463e (patch) | |
| tree | 58a62baae7795d8d3c3da4cfbf54dbe4bef8d523 /backend/include/rcc | |
| parent | 393e95fb39d1ddb366b1f17a51166cb3612bbbbd (diff) | |
| download | rcc-project-175fdbf4b30eae5e5344cd7fca7e953ca0b2463e.tar.gz rcc-project-175fdbf4b30eae5e5344cd7fca7e953ca0b2463e.tar.xz | |
[Tooling] Remove the duplicate output kind
Diffstat (limited to 'backend/include/rcc')
| -rw-r--r-- | backend/include/rcc/Tooling/ArtifactStore.h | 3 | ||||
| -rw-r--r-- | backend/include/rcc/Tooling/BackendDriver.h | 20 | ||||
| -rw-r--r-- | backend/include/rcc/Tooling/PipelineDriver.h | 1 |
3 files changed, 6 insertions, 18 deletions
diff --git a/backend/include/rcc/Tooling/ArtifactStore.h b/backend/include/rcc/Tooling/ArtifactStore.h index f11cd6c..e4bca4c 100644 --- a/backend/include/rcc/Tooling/ArtifactStore.h +++ b/backend/include/rcc/Tooling/ArtifactStore.h @@ -37,6 +37,9 @@ struct ReproducerPackage final { CanonicalMIR Input; }; +[[nodiscard]] bool isMIRArtifact(ArtifactKind Artifact) noexcept; +[[nodiscard]] bool isCacheableArtifact(ArtifactKind Artifact) noexcept; + [[nodiscard]] Expected<CanonicalMIR> parseAndCanonicalizeMIR(std::string SourceName, std::string SourceText, const TargetDescription &Target, diff --git a/backend/include/rcc/Tooling/BackendDriver.h b/backend/include/rcc/Tooling/BackendDriver.h index 6b04de9..8117a0c 100644 --- a/backend/include/rcc/Tooling/BackendDriver.h +++ b/backend/include/rcc/Tooling/BackendDriver.h @@ -19,20 +19,8 @@ class TargetDescription; namespace tooling { -enum class BackendOutputKind : std::uint8_t { - PreLegalizerMIR, - LegalizedMIR, - RegisterBankMIR, - SelectedMIR, - PostSSAMIR, - PostRegisterAllocationMIR, - FinalMIR, - Assembly, - RelocatableObject, -}; - struct BackendRunResult final { - BackendOutputKind Kind = BackendOutputKind::FinalMIR; + ArtifactKind Kind = ArtifactKind::FinalMIR; std::vector<std::uint8_t> Output; PipelineRunResult Pipeline; std::vector<MachineActionEvent> Actions; @@ -42,13 +30,9 @@ struct BackendRunResult final { [[nodiscard]] Expected<BackendRunResult> runBackend(CanonicalMIR Input, const TargetDescription &Target, const BackendInvocation &Invocation, - BackendOutputKind Output, PipelineControls Controls = {}, + ArtifactKind Output, PipelineControls Controls = {}, MachinePassInstrumentation *Instrumentation = nullptr); -[[nodiscard]] std::string_view spelling(BackendOutputKind Output) noexcept; -[[nodiscard]] ArtifactKind manifestArtifactKind(BackendOutputKind Output) noexcept; -[[nodiscard]] Expected<ArtifactKind> cacheArtifactKind(BackendOutputKind Output); - } // namespace tooling } // namespace rcc diff --git a/backend/include/rcc/Tooling/PipelineDriver.h b/backend/include/rcc/Tooling/PipelineDriver.h index 5fa4fba..d10fe4d 100644 --- a/backend/include/rcc/Tooling/PipelineDriver.h +++ b/backend/include/rcc/Tooling/PipelineDriver.h @@ -77,6 +77,7 @@ runRV64GCPipeline(mir::MIRDocument &Document, const TargetDescription &Target, const BackendInvocation &Invocation, PipelineControls Controls = {}, MachinePassInstrumentation *Instrumentation = nullptr); [[nodiscard]] BackendStage stageForFunction(const MachineFunction &Function) noexcept; +[[nodiscard]] bool isEarlierStage(BackendStage Left, BackendStage Right) noexcept; [[nodiscard]] std::string_view spelling(BackendStage Stage) noexcept; [[nodiscard]] Expected<BackendStage> parseBackendStage(std::string_view Value); |
