CIRCT  20.0.0git
RtgToolOptions.cpp
Go to the documentation of this file.
1 //===- RtgToolOptions.cpp -------------------------------------------------===//
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 
10 #include "circt/Support/Passes.h"
11 #include "mlir/Transforms/Passes.h"
12 
13 using namespace circt;
14 using namespace circt::rtg;
15 
16 //===----------------------------------------------------------------------===//
17 // RTG Tool Pipelines
18 //===----------------------------------------------------------------------===//
19 
20 void rtg::populateRandomizerPipeline(mlir::PassManager &pm,
21  const RtgToolOptions &options) {
22  pm.enableVerifier(options.getVerifyPasses());
23 
24  if (options.getVerbosePassExecution())
25  pm.addInstrumentation(
27  "rtgtool"));
28 
29  pm.addPass(createSimpleCanonicalizerPass());
31  // TODO: add elaboration pass here
32  pm.addPass(mlir::createCSEPass());
33  pm.addPass(createSimpleCanonicalizerPass());
34  }
35 }
The set of options used to control the behavior of the RTG tool.
OutputFormat getOutputFormat() const
bool getVerbosePassExecution() const
void populateRandomizerPipeline(mlir::PassManager &pm, const RtgToolOptions &options)
Populates the passes necessary to lower IR with RTG randomization operations to fully elaborated IR (...
The InstanceGraph op interface, see InstanceGraphInterface.td for more details.
Definition: DebugAnalysis.h:21
std::unique_ptr< Pass > createSimpleCanonicalizerPass()
Create a simple canonicalizer pass.
Definition: Passes.cpp:15