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

Use IR::Annotation::nameAnnotation everywhere instead of hard-coding @name annotation name #4628

Merged
merged 4 commits into from
Apr 18, 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
4 changes: 2 additions & 2 deletions frontends/p4/def_use.h
Original file line number Diff line number Diff line change
Expand Up @@ -466,8 +466,8 @@ class AllDefinitions : public IHasDbPrint {
/**
* Computes the write set for each expression and statement.
*
* This pass is run for each parser and control separately. It
* controls precisely the visit order --- to simulate a simbolic
* This pass is run for each parser and control separately. It
* controls precisely the visit order --- to simulate a symbolic
* execution of the program.
*
* @pre Must be executed after variable initializers have been removed.
Expand Down
3 changes: 2 additions & 1 deletion frontends/p4/simplifyParsers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@ class CollapseChains : public Transform {
auto node = oe.first;
// Avoid merging in case of state annotation
if (!node->annotations->annotations.empty()) {
if (!node->getAnnotation("name") || node->annotations->annotations.size() != 1)
if (!node->getAnnotation(IR::Annotation::nameAnnotation) ||
node->annotations->annotations.size() != 1)
continue;
}
auto outedges = oe.second;
Expand Down
Loading