Lines Matching defs:pipeline
132 report_fatal_error("Pass pipeline " + arg + " registered multiple times");
178 /// Returns the pass pipeline info for the specified pass pipeline argument or
449 FailureOr<OpPassManager> pipeline = parsePassPipeline(pipelineStr);
450 assert(succeeded(pipeline) && "invalid pass pipeline");
451 setValue(*pipeline);
465 // Use the textual format for pipeline comparisons.
482 FailureOr<OpPassManager> pipeline = parsePassPipeline(arg);
483 if (failed(pipeline))
485 value.value = std::make_unique<OpPassManager>(std::move(*pipeline));
523 /// This class represents a textual description of a pass pipeline.
526 /// Try to initialize this pipeline with the given pipeline text.
530 /// Add the internal pipeline elements to the provided pass manager.
536 /// A functor used to emit errors found during pipeline handling. The first
537 /// parameter corresponds to the raw location within the pipeline string. This
541 /// A struct to capture parsed pass pipeline names.
543 /// A pipeline is defined as a series of names, each of which may in itself
544 /// recursively contain a nested pipeline. A name is either the name of a pass
557 /// Parse the given pipeline text into the internal pipeline vector. This
558 /// function only parses the structure of the pipeline, and does not resolve
562 /// Resolve the elements of the pipeline, i.e. connect passes and pipelines to
568 /// Resolve a single element of the pipeline.
572 /// Add the given pipeline elements to the provided pass manager.
577 std::vector<PipelineElement> pipeline;
582 /// Try to initialize this pipeline with the given pipeline text. An option is
601 // Parse the provided pipeline string.
604 return resolvePipelineElements(pipeline, errorHandler);
607 /// Add the internal pipeline elements to the provided pass manager.
611 // Temporarily disable implicit nesting while we append to the pipeline. We
612 // want the created pipeline to exactly match the parsed text pipeline, so
618 return addToPipeline(pipeline, pm, errorHandler);
621 /// Parse the given pipeline text into the internal pipeline vector. This
622 /// function only parses the structure of the pipeline, and does not resolve
626 SmallVector<std::vector<PipelineElement> *, 4> pipelineStack = {&pipeline};
628 std::vector<PipelineElement> &pipeline = *pipelineStack.back();
630 pipeline.emplace_back(/*name=*/text.substr(0, pos).trim());
662 pipeline.back().options = text.substr(0, close);
672 // Push the inner pipeline onto the stack to continue processing.
673 pipelineStack.push_back(&pipeline.back().innerPipeline);
678 // empty strings in the pipeline.
680 // If we try to pop the outer pipeline we have unbalanced parentheses.
684 "parentheses while parsing pipeline");
695 // Otherwise, the end of an inner pipeline always has to be followed by
698 return errorHandler(text.data(), "expected ',' after parsing pipeline");
705 "encountered unbalanced parentheses while parsing pipeline");
707 assert(pipelineStack.back() == &pipeline &&
708 "wrong pipeline at the bottom of the stack");
712 /// Resolve the elements of the pipeline, i.e. connect passes and pipelines to
722 /// Resolve a single element of the pipeline.
726 // If the inner pipeline of this element is not empty, this is an operation
727 // pipeline.
731 // Otherwise, this must be a pass or pass pipeline.
732 // Check to see if a pipeline was registered with this name.
744 "registered pass or pass pipeline");
747 /// Add the given pipeline elements to the provided pass manager.
761 elt.options + "` to inner pipeline");
767 LogicalResult mlir::parsePassPipeline(StringRef pipeline, OpPassManager &pm,
770 if (failed(pipelineParser.initialize(pipeline, errorStream)))
781 FailureOr<OpPassManager> mlir::parsePassPipeline(StringRef pipeline,
783 pipeline = pipeline.trim();
784 // Pipelines are expected to be of the form `<op-name>(<pipeline>)`.
785 size_t pipelineStart = pipeline.find_first_of('(');
787 !pipeline.consume_back(")")) {
788 errorStream << "expected pass pipeline to be wrapped with the anchor "
793 StringRef opName = pipeline.take_front(pipelineStart).rtrim();
795 if (failed(parsePassPipeline(pipeline.drop_front(1 + pipelineStart), pm,
806 /// This struct represents the possible data entries in a parsed pass pipeline
814 /// or pass pipeline.
845 /// pipeline.
846 #define PASS_PIPELINE_ARG "pass-pipeline"
848 /// Adds command line option for each registered pass or pass pipeline, as well
861 /// pass registry entry, and does not include pipeline entries or the options
875 /// Add the pass pipeline entries.
929 // Check for any wider pass or pipeline options.
960 /// top-level of the parser, i.e. not within an explicit textual pipeline.
973 /// Construct a pass pipeline parser with the given command line description.
979 llvm::cl::desc("Textual description of the pass pipeline to run")) {}
998 /// top-level of the parser, i.e. not within an explicit textual pipeline.
1032 /// Construct a pass pipeline parser with the given command line description.
1046 /// top-level of the parser, i.e. not within an explicit textual pipeline.