-
Notifications
You must be signed in to change notification settings - Fork 307
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
822 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
add_subdirectory(IR) | ||
add_subdirectory(Transforms) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
set(LLVM_TARGET_DEFINITIONS RTGPasses.td) | ||
mlir_tablegen(RTGPasses.h.inc -gen-pass-decls) | ||
add_public_tablegen_target(CIRCTRTGTransformsIncGen) | ||
|
||
# Generate Pass documentation. | ||
add_circt_doc(RTGPasses RTGPasses -gen-pass-doc) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
//===- RTGPasses.h - RTG pass entry points ----------------------*- C++ -*-===// | ||
// | ||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | ||
// See https://llvm.org/LICENSE.txt for license information. | ||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
// | ||
//===----------------------------------------------------------------------===// | ||
// | ||
// This header file defines prototypes that expose pass constructors. | ||
// | ||
//===----------------------------------------------------------------------===// | ||
|
||
#ifndef CIRCT_DIALECT_RTG_TRANSFORMS_RTGPASSES_H | ||
#define CIRCT_DIALECT_RTG_TRANSFORMS_RTGPASSES_H | ||
|
||
#include "mlir/Pass/Pass.h" | ||
#include <memory> | ||
|
||
namespace circt { | ||
namespace rtg { | ||
|
||
/// Generate the code for registering passes. | ||
#define GEN_PASS_REGISTRATION | ||
#define GEN_PASS_DECL | ||
#include "circt/Dialect/RTG/Transforms/RTGPasses.h.inc" | ||
#undef GEN_PASS_REGISTRATION | ||
|
||
} // namespace rtg | ||
} // namespace circt | ||
|
||
#endif // CIRCT_DIALECT_RTG_TRANSFORMS_RTGPASSES_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
//===-- RTGPasses.td - RTG pass definition file ------------*- tablegen -*-===// | ||
// | ||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | ||
// See https://llvm.org/LICENSE.txt for license information. | ||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
// | ||
//===----------------------------------------------------------------------===// | ||
// | ||
// This file defines the passes that operate on the RTG dialect. | ||
// | ||
//===----------------------------------------------------------------------===// | ||
|
||
#ifndef CIRCT_DIALECT_RTG_TRANSFORMS_RTGPASSES_TD | ||
#define CIRCT_DIALECT_RTG_TRANSFORMS_RTGPASSES_TD | ||
|
||
include "mlir/Pass/PassBase.td" | ||
|
||
def ElaborationPass : Pass<"rtg-elaborate", "mlir::ModuleOp"> { | ||
let summary = "elaborate the randomization parts"; | ||
let description = [{ | ||
This pass interprets most RTG operations to perform the represented | ||
randomization and in the process get rid of those operations. This means, | ||
after this pass the IR does not contain any random constructs within tests | ||
anymore. | ||
}]; | ||
|
||
let options = [ | ||
Option<"seed", "seed", "unsigned", /*default=*/"", | ||
"The seed for any RNG constructs used in the pass.">, | ||
]; | ||
|
||
let dependentDialects = ["mlir::arith::ArithDialect"]; | ||
} | ||
|
||
#endif // CIRCT_DIALECT_RTG_TRANSFORMS_RTGPASSES_TD |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
add_subdirectory(IR) | ||
add_subdirectory(Transforms) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
add_circt_dialect_library(CIRCTRTGTransforms | ||
ElaborationPass.cpp | ||
|
||
DEPENDS | ||
CIRCTRTGTransformsIncGen | ||
|
||
LINK_COMPONENTS | ||
Support | ||
|
||
LINK_LIBS PRIVATE | ||
CIRCTRTGDialect | ||
MLIRArithDialect | ||
MLIRIR | ||
MLIRPass | ||
) | ||
|
Oops, something went wrong.