MLIR  18.0.0git
PassManager.h
Go to the documentation of this file.
1 //===- PassManager.h - Pass Management Interface ----------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef MLIR_PASS_PASSMANAGER_H
10 #define MLIR_PASS_PASSMANAGER_H
11 
12 #include "mlir/IR/Dialect.h"
15 #include "mlir/Support/Timing.h"
16 #include "llvm/ADT/SmallVector.h"
17 #include "llvm/ADT/iterator.h"
18 #include "llvm/Support/raw_ostream.h"
19 
20 #include <functional>
21 #include <vector>
22 #include <optional>
23 
24 namespace mlir {
25 class AnalysisManager;
26 class MLIRContext;
27 class Operation;
28 class Pass;
29 class PassInstrumentation;
30 class PassInstrumentor;
31 
32 namespace detail {
33 struct OpPassManagerImpl;
34 class OpToOpPassAdaptor;
35 class PassCrashReproducerGenerator;
36 struct PassExecutionState;
37 } // namespace detail
38 
39 //===----------------------------------------------------------------------===//
40 // OpPassManager
41 //===----------------------------------------------------------------------===//
42 
43 /// This class represents a pass manager that runs passes on either a specific
44 /// operation type, or any isolated operation. This pass manager can not be run
45 /// on an operation directly, but must be run either as part of a top-level
46 /// `PassManager`(e.g. when constructed via `nest` calls), or dynamically within
47 /// a pass by using the `Pass::runPipeline` API.
49 public:
50  /// This enum represents the nesting behavior of the pass manager.
51  enum class Nesting {
52  /// Implicit nesting behavior. This allows for adding passes operating on
53  /// operations different from this pass manager, in which case a new pass
54  /// manager is implicitly nested for the operation type of the new pass.
55  Implicit,
56  /// Explicit nesting behavior. This requires that any passes added to this
57  /// pass manager support its operation type.
58  Explicit
59  };
60 
61  /// Construct a new op-agnostic ("any") pass manager with the given operation
62  /// type and nesting behavior. This is the same as invoking:
63  /// `OpPassManager(getAnyOpAnchorName(), nesting)`.
65 
66  /// Construct a new pass manager with the given anchor operation type and
67  /// nesting behavior.
68  OpPassManager(StringRef name, Nesting nesting = Nesting::Explicit);
71  OpPassManager(const OpPassManager &rhs);
75 
76  /// Iterator over the passes in this pass manager.
77  using pass_iterator =
78  llvm::pointee_iterator<MutableArrayRef<std::unique_ptr<Pass>>::iterator>;
82 
84  llvm::pointee_iterator<ArrayRef<std::unique_ptr<Pass>>::const_iterator>;
85  const_pass_iterator begin() const;
86  const_pass_iterator end() const;
88  return {begin(), end()};
89  }
90 
91  /// Returns true if the pass manager has no passes.
92  bool empty() const { return begin() == end(); }
93 
94  /// Nest a new operation pass manager for the given operation kind under this
95  /// pass manager.
96  OpPassManager &nest(OperationName nestedName);
97  OpPassManager &nest(StringRef nestedName);
98  template <typename OpT>
100  return nest(OpT::getOperationName());
101  }
102 
103  /// Nest a new op-agnostic ("any") pass manager under this pass manager.
104  /// Note: This is the same as invoking `nest(getAnyOpAnchorName())`.
106 
107  /// Add the given pass to this pass manager. If this pass has a concrete
108  /// operation type, it must be the same type as this pass manager.
109  void addPass(std::unique_ptr<Pass> pass);
110 
111  /// Clear the pipeline, but not the other options set on this OpPassManager.
112  void clear();
113 
114  /// Add the given pass to a nested pass manager for the given operation kind
115  /// `OpT`.
116  template <typename OpT>
117  void addNestedPass(std::unique_ptr<Pass> pass) {
118  nest<OpT>().addPass(std::move(pass));
119  }
120 
121  /// Returns the number of passes held by this manager.
122  size_t size() const;
123 
124  /// Return the operation name that this pass manager operates on, or
125  /// std::nullopt if this is an op-agnostic pass manager.
126  std::optional<OperationName> getOpName(MLIRContext &context) const;
127 
128  /// Return the operation name that this pass manager operates on, or
129  /// std::nullopt if this is an op-agnostic pass manager.
130  std::optional<StringRef> getOpName() const;
131 
132  /// Return the name used to anchor this pass manager. This is either the name
133  /// of an operation, or the result of `getAnyOpAnchorName()` in the case of an
134  /// op-agnostic pass manager.
135  StringRef getOpAnchorName() const;
136 
137  /// Return the string name used to anchor op-agnostic pass managers that
138  /// operate generically on any viable operation.
139  static StringRef getAnyOpAnchorName() { return "any"; }
140 
141  /// Returns the internal implementation instance.
143 
144  /// Prints out the passes of the pass manager as the textual representation
145  /// of pipelines.
146  /// Note: The quality of the string representation depends entirely on the
147  /// the correctness of per-pass overrides of Pass::printAsTextualPipeline.
148  void printAsTextualPipeline(raw_ostream &os) const;
149 
150  /// Raw dump of the pass manager to llvm::errs().
151  void dump();
152 
153  /// Merge the pass statistics of this class into 'other'.
154  void mergeStatisticsInto(OpPassManager &other);
155 
156  /// Register dependent dialects for the current pass manager.
157  /// This is forwarding to every pass in this PassManager, see the
158  /// documentation for the same method on the Pass class.
159  void getDependentDialects(DialectRegistry &dialects) const;
160 
161  /// Enable or disable the implicit nesting on this particular PassManager.
162  /// This will also apply to any newly nested PassManager built from this
163  /// instance.
164  void setNesting(Nesting nesting);
165 
166  /// Return the current nesting mode.
168 
169 private:
170  /// Initialize all of the passes within this pass manager with the given
171  /// initialization generation. The initialization generation is used to detect
172  /// if a pass manager has already been initialized.
173  LogicalResult initialize(MLIRContext *context, unsigned newInitGeneration);
174 
175  /// Compute a hash of the pipeline, so that we can detect changes (a pass is
176  /// added...).
177  llvm::hash_code hash();
178 
179  /// A pointer to an internal implementation instance.
180  std::unique_ptr<detail::OpPassManagerImpl> impl;
181 
182  /// Allow access to initialize.
184 
185  /// Allow access to the constructor.
186  friend class PassManager;
187  friend class Pass;
188 
189  /// Allow access.
191 };
192 
193 //===----------------------------------------------------------------------===//
194 // PassManager
195 //===----------------------------------------------------------------------===//
196 
197 /// An enum describing the different display modes for the information within
198 /// the pass manager.
199 enum class PassDisplayMode {
200  // In this mode the results are displayed in a list sorted by total,
201  // with each pass/analysis instance aggregated into one unique result.
202  List,
203 
204  // In this mode the results are displayed in a nested pipeline view that
205  // mirrors the internal pass pipeline that is being executed in the pass
206  // manager.
207  Pipeline,
208 };
209 
210 /// The main pass manager and pipeline builder.
211 class PassManager : public OpPassManager {
212 public:
213  /// Create a new pass manager under the given context with a specific nesting
214  /// style. The created pass manager can schedule operations that match
215  /// `operationName`.
217  StringRef operationName = PassManager::getAnyOpAnchorName(),
218  Nesting nesting = Nesting::Explicit);
219  PassManager(OperationName operationName, Nesting nesting = Nesting::Explicit);
221 
222  /// Create a new pass manager under the given context with a specific nesting
223  /// style. The created pass manager can schedule operations that match
224  /// `OperationTy`.
225  template <typename OperationTy>
227  return PassManager(ctx, OperationTy::getOperationName(), nesting);
228  }
229 
230  /// Run the passes within this manager on the provided operation. The
231  /// specified operation must have the same name as the one provided the pass
232  /// manager on construction.
234 
235  /// Return an instance of the context.
236  MLIRContext *getContext() const { return context; }
237 
238  /// Enable support for the pass manager to generate a reproducer on the event
239  /// of a crash or a pass failure. `outputFile` is a .mlir filename used to
240  /// write the generated reproducer. If `genLocalReproducer` is true, the pass
241  /// manager will attempt to generate a local reproducer that contains the
242  /// smallest pipeline.
243  void enableCrashReproducerGeneration(StringRef outputFile,
244  bool genLocalReproducer = false);
245 
246  /// Streams on which to output crash reproducer.
248  virtual ~ReproducerStream() = default;
249 
250  /// Description of the reproducer stream.
251  virtual StringRef description() = 0;
252 
253  /// Stream on which to output reproducer.
254  virtual raw_ostream &os() = 0;
255  };
256 
257  /// Method type for constructing ReproducerStream.
259  std::function<std::unique_ptr<ReproducerStream>(std::string &error)>;
260 
261  /// Enable support for the pass manager to generate a reproducer on the event
262  /// of a crash or a pass failure. `factory` is used to construct the streams
263  /// to write the generated reproducer to. If `genLocalReproducer` is true, the
264  /// pass manager will attempt to generate a local reproducer that contains the
265  /// smallest pipeline.
267  bool genLocalReproducer = false);
268 
269  /// Runs the verifier after each individual pass.
270  void enableVerifier(bool enabled = true);
271 
272  //===--------------------------------------------------------------------===//
273  // Instrumentations
274  //===--------------------------------------------------------------------===//
275 
276  /// Add the provided instrumentation to the pass manager.
277  void addInstrumentation(std::unique_ptr<PassInstrumentation> pi);
278 
279  //===--------------------------------------------------------------------===//
280  // IR Printing
281 
282  /// A configuration struct provided to the IR printer instrumentation.
284  public:
285  using PrintCallbackFn = function_ref<void(raw_ostream &)>;
286 
287  /// Initialize the configuration.
288  /// * 'printModuleScope' signals if the top-level module IR should always be
289  /// printed. This should only be set to true when multi-threading is
290  /// disabled, otherwise we may try to print IR that is being modified
291  /// asynchronously.
292  /// * 'printAfterOnlyOnChange' signals that when printing the IR after a
293  /// pass, in the case of a non-failure, we should first check if any
294  /// potential mutations were made. This allows for reducing the number of
295  /// logs that don't contain meaningful changes.
296  /// * 'printAfterOnlyOnFailure' signals that when printing the IR after a
297  /// pass, we only print in the case of a failure.
298  /// - This option should *not* be used with the other `printAfter` flags
299  /// above.
300  /// * 'opPrintingFlags' sets up the printing flags to use when printing the
301  /// IR.
302  explicit IRPrinterConfig(
303  bool printModuleScope = false, bool printAfterOnlyOnChange = false,
304  bool printAfterOnlyOnFailure = false,
305  OpPrintingFlags opPrintingFlags = OpPrintingFlags());
306  virtual ~IRPrinterConfig();
307 
308  /// A hook that may be overridden by a derived config that checks if the IR
309  /// of 'operation' should be dumped *before* the pass 'pass' has been
310  /// executed. If the IR should be dumped, 'printCallback' should be invoked
311  /// with the stream to dump into.
312  virtual void printBeforeIfEnabled(Pass *pass, Operation *operation,
313  PrintCallbackFn printCallback);
314 
315  /// A hook that may be overridden by a derived config that checks if the IR
316  /// of 'operation' should be dumped *after* the pass 'pass' has been
317  /// executed. If the IR should be dumped, 'printCallback' should be invoked
318  /// with the stream to dump into.
319  virtual void printAfterIfEnabled(Pass *pass, Operation *operation,
320  PrintCallbackFn printCallback);
321 
322  /// Returns true if the IR should always be printed at the top-level scope.
323  bool shouldPrintAtModuleScope() const { return printModuleScope; }
324 
325  /// Returns true if the IR should only printed after a pass if the IR
326  /// "changed".
327  bool shouldPrintAfterOnlyOnChange() const { return printAfterOnlyOnChange; }
328 
329  /// Returns true if the IR should only printed after a pass if the pass
330  /// "failed".
332  return printAfterOnlyOnFailure;
333  }
334 
335  /// Returns the printing flags to be used to print the IR.
336  OpPrintingFlags getOpPrintingFlags() const { return opPrintingFlags; }
337 
338  private:
339  /// A flag that indicates if the IR should be printed at module scope.
340  bool printModuleScope;
341 
342  /// A flag that indicates that the IR after a pass should only be printed if
343  /// a change is detected.
344  bool printAfterOnlyOnChange;
345 
346  /// A flag that indicates that the IR after a pass should only be printed if
347  /// the pass failed.
348  bool printAfterOnlyOnFailure;
349 
350  /// Flags to control printing behavior.
351  OpPrintingFlags opPrintingFlags;
352  };
353 
354  /// Add an instrumentation to print the IR before and after pass execution,
355  /// using the provided configuration.
356  void enableIRPrinting(std::unique_ptr<IRPrinterConfig> config);
357 
358  /// Add an instrumentation to print the IR before and after pass execution,
359  /// using the provided fields to generate a default configuration:
360  /// * 'shouldPrintBeforePass' and 'shouldPrintAfterPass' correspond to filter
361  /// functions that take a 'Pass *' and `Operation *`. These function should
362  /// return true if the IR should be printed or not.
363  /// * 'printModuleScope' signals if the module IR should be printed, even
364  /// for non module passes.
365  /// * 'printAfterOnlyOnChange' signals that when printing the IR after a
366  /// pass, in the case of a non-failure, we should first check if any
367  /// potential mutations were made.
368  /// * 'printAfterOnlyOnFailure' signals that when printing the IR after a
369  /// pass, we only print in the case of a failure.
370  /// - This option should *not* be used with the other `printAfter` flags
371  /// above.
372  /// * 'out' corresponds to the stream to output the printed IR to.
373  /// * 'opPrintingFlags' sets up the printing flags to use when printing the
374  /// IR.
375  void enableIRPrinting(
376  std::function<bool(Pass *, Operation *)> shouldPrintBeforePass =
377  [](Pass *, Operation *) { return true; },
378  std::function<bool(Pass *, Operation *)> shouldPrintAfterPass =
379  [](Pass *, Operation *) { return true; },
380  bool printModuleScope = true, bool printAfterOnlyOnChange = true,
381  bool printAfterOnlyOnFailure = false, raw_ostream &out = llvm::errs(),
382  OpPrintingFlags opPrintingFlags = OpPrintingFlags());
383 
384  //===--------------------------------------------------------------------===//
385  // Pass Timing
386 
387  /// Add an instrumentation to time the execution of passes and the computation
388  /// of analyses. Timing will be reported by nesting timers into the provided
389  /// `timingScope`.
390  ///
391  /// Note: Timing should be enabled after all other instrumentations to avoid
392  /// any potential "ghost" timing from other instrumentations being
393  /// unintentionally included in the timing results.
394  void enableTiming(TimingScope &timingScope);
395 
396  /// Add an instrumentation to time the execution of passes and the computation
397  /// of analyses. The pass manager will take ownership of the timing manager
398  /// passed to the function and timing will be reported by nesting timers into
399  /// the timing manager's root scope.
400  ///
401  /// Note: Timing should be enabled after all other instrumentations to avoid
402  /// any potential "ghost" timing from other instrumentations being
403  /// unintentionally included in the timing results.
404  void enableTiming(std::unique_ptr<TimingManager> tm);
405 
406  /// Add an instrumentation to time the execution of passes and the computation
407  /// of analyses. Creates a temporary TimingManager owned by this PassManager
408  /// which will be used to report timing.
409  ///
410  /// Note: Timing should be enabled after all other instrumentations to avoid
411  /// any potential "ghost" timing from other instrumentations being
412  /// unintentionally included in the timing results.
413  void enableTiming();
414 
415  //===--------------------------------------------------------------------===//
416  // Pass Statistics
417 
418  /// Prompts the pass manager to print the statistics collected for each of the
419  /// held passes after each call to 'run'.
420  void
422 
423 private:
424  /// Dump the statistics of the passes within this pass manager.
425  void dumpStatistics();
426 
427  /// Run the pass manager with crash recovery enabled.
428  LogicalResult runWithCrashRecovery(Operation *op, AnalysisManager am);
429 
430  /// Run the passes of the pass manager, and return the result.
431  LogicalResult runPasses(Operation *op, AnalysisManager am);
432 
433  /// Context this PassManager was initialized with.
434  MLIRContext *context;
435 
436  /// Flag that specifies if pass statistics should be dumped.
437  std::optional<PassDisplayMode> passStatisticsMode;
438 
439  /// A manager for pass instrumentations.
440  std::unique_ptr<PassInstrumentor> instrumentor;
441 
442  /// An optional crash reproducer generator, if this pass manager is setup to
443  /// generate reproducers.
444  std::unique_ptr<detail::PassCrashReproducerGenerator> crashReproGenerator;
445 
446  /// Hash keys used to detect when reinitialization is necessary.
447  llvm::hash_code initializationKey =
448  DenseMapInfo<llvm::hash_code>::getTombstoneKey();
449  llvm::hash_code pipelineInitializationKey =
450  DenseMapInfo<llvm::hash_code>::getTombstoneKey();
451 
452  /// Flag that specifies if pass timing is enabled.
453  bool passTiming : 1;
454 
455  /// A flag that indicates if the IR should be verified in between passes.
456  bool verifyPasses : 1;
457 };
458 
459 /// Register a set of useful command-line options that can be used to configure
460 /// a pass manager. The values of these options can be applied via the
461 /// 'applyPassManagerCLOptions' method below.
463 
464 /// Apply any values provided to the pass manager options that were registered
465 /// with 'registerPassManagerOptions'.
466 LogicalResult applyPassManagerCLOptions(PassManager &pm);
467 
468 /// Apply any values provided to the timing manager options that were registered
469 /// with `registerDefaultTimingManagerOptions`. This is a handy helper function
470 /// if you do not want to bother creating your own timing manager and passing it
471 /// to the pass manager.
472 void applyDefaultTimingPassManagerCLOptions(PassManager &pm);
473 
474 } // namespace mlir
475 
476 #endif // MLIR_PASS_PASSMANAGER_H
The DialectRegistry maps a dialect namespace to a constructor for the matching dialect.
MLIRContext is the top-level object for a collection of MLIR operations.
Definition: MLIRContext.h:60
This class represents a pass manager that runs passes on either a specific operation type,...
Definition: PassManager.h:48
void mergeStatisticsInto(OpPassManager &other)
Merge the pass statistics of this class into 'other'.
OpPassManager & operator=(const OpPassManager &rhs)
Definition: Pass.cpp:309
friend class PassManager
Allow access to the constructor.
Definition: PassManager.h:186
OpPassManager(Nesting nesting=Nesting::Explicit)
Construct a new op-agnostic ("any") pass manager with the given operation type and nesting behavior.
Definition: Pass.cpp:301
OpPassManager & nest()
Definition: PassManager.h:99
iterator_range< const_pass_iterator > getPasses() const
Definition: PassManager.h:87
void printAsTextualPipeline(raw_ostream &os) const
Prints out the passes of the pass manager as the textual representation of pipelines.
Definition: Pass.cpp:375
friend class Pass
Definition: PassManager.h:187
void setNesting(Nesting nesting)
Enable or disable the implicit nesting on this particular PassManager.
Definition: Pass.cpp:402
bool empty() const
Returns true if the pass manager has no passes.
Definition: PassManager.h:92
size_t size() const
Returns the number of passes held by this manager.
Definition: Pass.cpp:353
detail::OpPassManagerImpl & getImpl()
Returns the internal implementation instance.
Definition: Pass.cpp:356
void addPass(std::unique_ptr< Pass > pass)
Add the given pass to this pass manager.
Definition: Pass.cpp:346
Nesting getNesting()
Return the current nesting mode.
Definition: Pass.cpp:404
Nesting
This enum represents the nesting behavior of the pass manager.
Definition: PassManager.h:51
@ Implicit
Implicit nesting behavior.
@ Explicit
Explicit nesting behavior.
void dump()
Raw dump of the pass manager to llvm::errs().
Definition: Pass.cpp:386
llvm::pointee_iterator< MutableArrayRef< std::unique_ptr< Pass > >::iterator > pass_iterator
Iterator over the passes in this pass manager.
Definition: PassManager.h:78
llvm::pointee_iterator< ArrayRef< std::unique_ptr< Pass > >::const_iterator > const_pass_iterator
Definition: PassManager.h:84
void addNestedPass(std::unique_ptr< Pass > pass)
Add the given pass to a nested pass manager for the given operation kind OpT.
Definition: PassManager.h:117
void getDependentDialects(DialectRegistry &dialects) const
Register dependent dialects for the current pass manager.
Definition: Pass.cpp:398
StringRef getOpAnchorName() const
Return the name used to anchor this pass manager.
Definition: Pass.cpp:369
std::optional< StringRef > getOpName() const
Return the operation name that this pass manager operates on, or std::nullopt if this is an op-agnost...
Definition: Pass.cpp:359
OpPassManager & nestAny()
Nest a new op-agnostic ("any") pass manager under this pass manager.
Definition: Pass.cpp:342
iterator_range< pass_iterator > getPasses()
Definition: PassManager.h:81
static StringRef getAnyOpAnchorName()
Return the string name used to anchor op-agnostic pass managers that operate generically on any viabl...
Definition: PassManager.h:139
void clear()
Clear the pipeline, but not the other options set on this OpPassManager.
Definition: Pass.cpp:350
pass_iterator begin()
Definition: Pass.cpp:320
pass_iterator end()
Definition: Pass.cpp:323
Set of flags used to control the behavior of the various IR print methods (e.g.
Operation is the basic unit of execution within MLIR.
Definition: Operation.h:88
A configuration struct provided to the IR printer instrumentation.
Definition: PassManager.h:283
IRPrinterConfig(bool printModuleScope=false, bool printAfterOnlyOnChange=false, bool printAfterOnlyOnFailure=false, OpPrintingFlags opPrintingFlags=OpPrintingFlags())
Initialize the configuration.
Definition: IRPrinting.cpp:132
bool shouldPrintAfterOnlyOnFailure() const
Returns true if the IR should only printed after a pass if the pass "failed".
Definition: PassManager.h:331
virtual void printBeforeIfEnabled(Pass *pass, Operation *operation, PrintCallbackFn printCallback)
A hook that may be overridden by a derived config that checks if the IR of 'operation' should be dump...
Definition: IRPrinting.cpp:146
bool shouldPrintAtModuleScope() const
Returns true if the IR should always be printed at the top-level scope.
Definition: PassManager.h:323
virtual void printAfterIfEnabled(Pass *pass, Operation *operation, PrintCallbackFn printCallback)
A hook that may be overridden by a derived config that checks if the IR of 'operation' should be dump...
Definition: IRPrinting.cpp:155
OpPrintingFlags getOpPrintingFlags() const
Returns the printing flags to be used to print the IR.
Definition: PassManager.h:336
bool shouldPrintAfterOnlyOnChange() const
Returns true if the IR should only printed after a pass if the IR "changed".
Definition: PassManager.h:327
The main pass manager and pipeline builder.
Definition: PassManager.h:211
void enableStatistics(PassDisplayMode displayMode=PassDisplayMode::Pipeline)
Prompts the pass manager to print the statistics collected for each of the held passes after each cal...
MLIRContext * getContext() const
Return an instance of the context.
Definition: PassManager.h:236
void enableTiming()
Add an instrumentation to time the execution of passes and the computation of analyses.
Definition: PassTiming.cpp:164
void enableIRPrinting(std::unique_ptr< IRPrinterConfig > config)
Add an instrumentation to print the IR before and after pass execution, using the provided configurat...
Definition: IRPrinting.cpp:204
LogicalResult run(Operation *op)
Run the passes within this manager on the provided operation.
Definition: Pass.cpp:822
static PassManager on(MLIRContext *ctx, Nesting nesting=Nesting::Explicit)
Create a new pass manager under the given context with a specific nesting style.
Definition: PassManager.h:226
void addInstrumentation(std::unique_ptr< PassInstrumentation > pi)
Add the provided instrumentation to the pass manager.
Definition: Pass.cpp:872
std::function< std::unique_ptr< ReproducerStream >(std::string &error)> ReproducerStreamFactory
Method type for constructing ReproducerStream.
Definition: PassManager.h:259
void enableCrashReproducerGeneration(StringRef outputFile, bool genLocalReproducer=false)
Enable support for the pass manager to generate a reproducer on the event of a crash or a pass failur...
void enableVerifier(bool enabled=true)
Runs the verifier after each individual pass.
Definition: Pass.cpp:819
The abstract base pass class.
Definition: Pass.h:51
An adaptor pass used to run operation passes over nested operations.
Definition: PassDetail.h:46
Include the generated interface declarations.
LogicalResult applyPassManagerCLOptions(PassManager &pm)
Apply any values provided to the pass manager options that were registered with 'registerPassManagerO...
void registerPassManagerCLOptions()
Register a set of useful command-line options that can be used to configure a pass manager.
PassDisplayMode
An enum describing the different display modes for the information within the pass manager.
Definition: PassManager.h:199
void applyDefaultTimingPassManagerCLOptions(PassManager &pm)
Apply any values provided to the timing manager options that were registered with registerDefaultTimi...
This class represents an efficient way to signal success or failure.
Definition: LogicalResult.h:26
Streams on which to output crash reproducer.
Definition: PassManager.h:247
virtual raw_ostream & os()=0
Stream on which to output reproducer.
virtual StringRef description()=0
Description of the reproducer stream.