|
Jlm
|
#include <gtest/gtest.h>#include <jlm/llvm/ir/operators/lambda.hpp>#include <jlm/llvm/ir/RvsdgModule.hpp>#include <jlm/llvm/ir/types.hpp>#include <jlm/mlir/backend/JlmToMlirConverter.hpp>#include <jlm/rvsdg/bitstring/comparison.hpp>#include <jlm/rvsdg/bitstring/constant.hpp>
Go to the source code of this file.
Functions | |
| TEST (JlmToMlirConverterTests, TestLambda) | |
| static void | useChainsUpTraverse (mlir::Operation *operation, std::vector< llvm::StringRef > definingOperations) |
| useChainsUpTraverse More... | |
| TEST (JlmToMlirConverterTests, TestAddOperation) | |
| TestAddOperation. More... | |
| TEST (JlmToMlirConverterTests, TestComZeroExt) | |
| TestAddOperation. More... | |
| TEST (JlmToMlirConverterTests, TestMatch) | |
| TestMatch. More... | |
| TEST (JlmToMlirConverterTests, TestGamma) | |
| TestGamma. More... | |
| TEST (JlmToMlirConverterTests, TestTheta) | |
| TestTheta. More... | |
| TEST | ( | JlmToMlirConverterTests | , |
| TestAddOperation | |||
| ) |
TestAddOperation.
This test is similar to TestLambda, but it adds a add operation to the lambda block and does a graph traversal. This function is similar to the TestDivOperation function in the frontend tests.
This function tests the generation of an add operation using 2 bit constants as operands in the MLIR backend. The test checks the number of blocks and operations in the generated MLIR. It also checks the types of the operations and the users chain upwards from the lambda result to the bit constants. The users trace goes through the operation first operand user recursively to trace the nodes.
Definition at line 140 of file JlmToMlirConverterTests.cpp.
| TEST | ( | JlmToMlirConverterTests | , |
| TestComZeroExt | |||
| ) |
TestAddOperation.
This test is similar to previous tests, but uses a mul, zero extension and comparison operation, it tests operations types and does the use chain traversal.
Definition at line 237 of file JlmToMlirConverterTests.cpp.
| TEST | ( | JlmToMlirConverterTests | , |
| TestGamma | |||
| ) |
TestGamma.
This test is similar to previous tests, but uses a gamma operation
getInputs() corresponds to the entryVars
Definition at line 478 of file JlmToMlirConverterTests.cpp.
| TEST | ( | JlmToMlirConverterTests | , |
| TestLambda | |||
| ) |
Definition at line 16 of file JlmToMlirConverterTests.cpp.
| TEST | ( | JlmToMlirConverterTests | , |
| TestMatch | |||
| ) |
TestMatch.
This test is similar to previous tests, but uses a match operation
Definition at line 375 of file JlmToMlirConverterTests.cpp.
| TEST | ( | JlmToMlirConverterTests | , |
| TestTheta | |||
| ) |
TestTheta.
This test is similar to previous tests, but uses a theta operation
getInputs() corresponds to the loop vars
Definition at line 594 of file JlmToMlirConverterTests.cpp.
|
static |
useChainsUpTraverse
This function checks if the given operation matches the given definingOperations use chain recursively. For each operation the operand 0 is checked until the definingOperations is empty.
| operation | The starting operation to check. (the lambda result for example) |
| definingOperations | The trace of operations to check. The last operation is the direct user of the given operation operand and the first operation is the last operation that will be checked on the chain. |
Definition at line 115 of file JlmToMlirConverterTests.cpp.