diff --git a/include/revng/Pipeline/Loader.h b/include/revng/Pipeline/Loader.h index 624568442..0b223be3e 100644 --- a/include/revng/Pipeline/Loader.h +++ b/include/revng/Pipeline/Loader.h @@ -29,7 +29,7 @@ struct ContainerDeclaration { }; struct PipeInvocation { - std::string Name; + std::string Type; std::vector UsedContainers; std::vector Passes = {}; std::vector EnabledWhen = {}; @@ -168,7 +168,7 @@ LLVM_YAML_IS_SEQUENCE_VECTOR(pipeline::ContainerDeclaration) template<> struct llvm::yaml::MappingTraits { static void mapping(IO &io, pipeline::PipeInvocation &info) { - io.mapRequired("Name", info.Name); + io.mapRequired("Type", info.Type); io.mapRequired("UsedContainers", info.UsedContainers); io.mapOptional("Passes", info.Passes); io.mapOptional("EnabledWhen", info.EnabledWhen); diff --git a/lib/Pipeline/Loader.cpp b/lib/Pipeline/Loader.cpp index 0c842b9ec..190e2dbe0 100644 --- a/lib/Pipeline/Loader.cpp +++ b/lib/Pipeline/Loader.cpp @@ -69,16 +69,16 @@ Loader::parseLLVMPass(Step &Step, const PipeInvocation &Invocation) const { llvm::Error Loader::parseInvocation(Step &Step, const PipeInvocation &Invocation) const { - if (Invocation.Name == "LLVMPipe") + if (Invocation.Type == "LLVMPipe") return parseLLVMPass(Step, Invocation); - auto It = KnownPipesTypes.find(Invocation.Name); + auto It = KnownPipesTypes.find(Invocation.Type); if (It == KnownPipesTypes.end()) { auto *Message = "while parsing pipe invocation: No known Pipe with " "name %s\n "; return createStringError(inconvertibleErrorCode(), Message, - Invocation.Name.c_str()); + Invocation.Type.c_str()); } auto &Entry = It->second; Step.addPipe(Entry(Invocation.UsedContainers)); diff --git a/python/revng/cli/translate/pipelines/isolate-translate.yml b/python/revng/cli/translate/pipelines/isolate-translate.yml index aed2c2504..dc4cd946b 100644 --- a/python/revng/cli/translate/pipelines/isolate-translate.yml +++ b/python/revng/cli/translate/pipelines/isolate-translate.yml @@ -3,18 +3,18 @@ Containers: Steps: - Name: Isolate Pipes: - - Name: LLVMPipe + - Type: LLVMPipe UsedContainers: [module] Passes: [detect-abi, isolate, invoke-isolated-functions, cache-call-graph] - Name: RecompileIsolated Pipes: - - Name: LinkSupport + - Type: LinkSupport UsedContainers: [module] - - Name: LLVMPipe + - Type: LLVMPipe UsedContainers: [module] Passes: [O2] EnabledWhen: [O2] - - Name: CompileIsolated + - Type: CompileIsolated UsedContainers: [module, object] - - Name: LinkForTranslation + - Type: LinkForTranslation UsedContainers: [input, object, output] diff --git a/python/revng/cli/translate/pipelines/translate.yml b/python/revng/cli/translate/pipelines/translate.yml index f29818a01..30ac5e556 100644 --- a/python/revng/cli/translate/pipelines/translate.yml +++ b/python/revng/cli/translate/pipelines/translate.yml @@ -10,21 +10,21 @@ Containers: Steps: - Name: Lift Pipes: - - Name: Lift + - Type: Lift UsedContainers: [input, module] - - Name: LLVMPipe + - Type: LLVMPipe UsedContainers: [module] Passes: [globaldce] - Name: Lifted - Name: Recompile Pipes: - - Name: LinkSupport + - Type: LinkSupport UsedContainers: [module] - - Name: LLVMPipe + - Type: LLVMPipe UsedContainers: [module] Passes: [O2] EnabledWhen: [O2] - - Name: Compile + - Type: Compile UsedContainers: [module, object] - - Name: LinkForTranslation + - Type: LinkForTranslation UsedContainers: [input, object, output] diff --git a/tests/tools/pipeline/CopyPipeFlagTestPipeline.yml b/tests/tools/pipeline/CopyPipeFlagTestPipeline.yml index 9c85b444c..64ca1f51b 100644 --- a/tests/tools/pipeline/CopyPipeFlagTestPipeline.yml +++ b/tests/tools/pipeline/CopyPipeFlagTestPipeline.yml @@ -6,6 +6,6 @@ Containers: Steps: - Name: FirstStep Pipes: - - Name: CopyPipe + - Type: CopyPipe UsedContainers: [Strings1, Strings2] EnabledWhen: [~DisableCopyPipe] diff --git a/tests/tools/pipeline/CopyPipeTestPipeline.yml b/tests/tools/pipeline/CopyPipeTestPipeline.yml index 64bcf914e..0f7f8c1fd 100644 --- a/tests/tools/pipeline/CopyPipeTestPipeline.yml +++ b/tests/tools/pipeline/CopyPipeTestPipeline.yml @@ -6,5 +6,5 @@ Containers: Steps: - Name: FirstStep Pipes: - - Name: CopyPipe + - Type: CopyPipe UsedContainers: [Strings1, Strings2] diff --git a/tests/tools/pipeline/MissingPassPipelineTest.yml b/tests/tools/pipeline/MissingPassPipelineTest.yml index 21214a77d..8c5a59822 100644 --- a/tests/tools/pipeline/MissingPassPipelineTest.yml +++ b/tests/tools/pipeline/MissingPassPipelineTest.yml @@ -4,6 +4,6 @@ Containers: Steps: - Name: FirstStep Pipes: - - Name: PureLLVMPipe + - Type: PureLLVMPipe UsedContainers: [C1] Passes: [NonExistantAtAllPass] diff --git a/tests/tools/pipeline/MultiStepPipeline.yml b/tests/tools/pipeline/MultiStepPipeline.yml index dca5c5740..97de9863b 100644 --- a/tests/tools/pipeline/MultiStepPipeline.yml +++ b/tests/tools/pipeline/MultiStepPipeline.yml @@ -8,9 +8,9 @@ Containers: Steps: - Name: FirstStep Pipes: - - Name: CopyPipe + - Type: CopyPipe UsedContainers: [Strings1, Strings2] - Name: SecondStep Pipes: - - Name: CopyPipe + - Type: CopyPipe UsedContainers: [Strings2, Strings3] diff --git a/tests/tools/pipeline/PassPipelineTest.yml b/tests/tools/pipeline/PassPipelineTest.yml index 2b1fce048..4adf1eb44 100644 --- a/tests/tools/pipeline/PassPipelineTest.yml +++ b/tests/tools/pipeline/PassPipelineTest.yml @@ -4,6 +4,6 @@ Containers: Steps: - Name: FirstStep Pipes: - - Name: LLVMPipe + - Type: LLVMPipe UsedContainers: [C1] Passes: [example-pass] diff --git a/tests/unit/Pipeline.cpp b/tests/unit/Pipeline.cpp index d7cb65f2b..7633e6c47 100644 --- a/tests/unit/Pipeline.cpp +++ b/tests/unit/Pipeline.cpp @@ -855,7 +855,7 @@ static const std::string Pipeline(R"(--- Steps: - Name: FirstStep Pipes: - - Name: FineGranerPipe + - Type: FineGranerPipe UsedContainers: - ContainerName - ContainerName @@ -877,7 +877,7 @@ static const std::string PipelineTree(R"(--- Steps: - Name: FirstStep Pipes: - - Name: FineGranerPipe + - Type: FineGranerPipe UsedContainers: - ContainerName - ContainerName @@ -925,7 +925,7 @@ BOOST_AUTO_TEST_CASE(LoaderTestFromYamlLLVM) { Steps: - Name: FirstStep Pipes: - - Name: LLVMPipe + - Type: LLVMPipe UsedContainers: - CustomName Passes: diff --git a/tests/unit/PipelineC.cpp b/tests/unit/PipelineC.cpp index 949d36064..60f114391 100644 --- a/tests/unit/PipelineC.cpp +++ b/tests/unit/PipelineC.cpp @@ -22,7 +22,7 @@ const auto PipelineTextContent = Steps: - Name: FirstStep Pipes: - - Name: CopyPipe + - Type: CopyPipe UsedContainers: [Strings1, Strings2] )";