Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Midend def-use pass #4489

Merged
merged 5 commits into from
Mar 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions backends/p4test/midend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,14 @@ limitations under the License.
#include "frontends/p4/simplifyParsers.h"
#include "frontends/p4/strengthReduction.h"
#include "frontends/p4/toP4/toP4.h"
#include "frontends/p4/typeChecking/typeChecker.h"
#include "frontends/p4/typeMap.h"
#include "frontends/p4/unusedDeclarations.h"
#include "midend/actionSynthesis.h"
#include "midend/compileTimeOps.h"
#include "midend/complexComparison.h"
#include "midend/copyStructures.h"
#include "midend/def_use.h"
#include "midend/eliminateInvalidHeaders.h"
#include "midend/eliminateNewtype.h"
#include "midend/eliminateSerEnums.h"
Expand Down Expand Up @@ -121,6 +123,9 @@ MidEnd::MidEnd(CompilerOptions &options, std::ostream *outStream) {
new P4::CompileTimeOperations(),
new P4::TableHit(&refMap, &typeMap),
new P4::EliminateSwitch(&refMap, &typeMap),
new P4::ResolveReferences(&refMap),
new P4::TypeChecking(&refMap, &typeMap, true), // update types before ComputeDefUse
new P4::ComputeDefUse, // present for testing
evaluator,
[v1controls, evaluator](const IR::Node *root) -> const IR::Node * {
auto toplevel = evaluator->getToplevelBlock();
Expand Down
2 changes: 2 additions & 0 deletions midend/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ set (MIDEND_SRCS
convertErrors.cpp
copyStructures.cpp
coverage.cpp
def_use.cpp
eliminateInvalidHeaders.cpp
eliminateNewtype.cpp
eliminateSerEnums.cpp
Expand Down Expand Up @@ -71,6 +72,7 @@ set (MIDEND_HDRS
convertErrors.h
copyStructures.h
coverage.h
def_use.h
eliminateInvalidHeaders.h
eliminateNewtype.h
eliminateSerEnums.h
Expand Down
Loading
Loading