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

Run def-use analysis again after inlining #3591

Merged
merged 6 commits into from
Oct 24, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
Correctly handle don't care named arguments
Signed-off-by: Mihai Budiu <mbudiu@vmware.com>
  • Loading branch information
Mihai Budiu committed Oct 21, 2022
commit 1082d92293ba0e1b504d1788d9af1ff4f240f730
2 changes: 1 addition & 1 deletion frontends/p4/simplifyDefUse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1490,7 +1490,7 @@ class RemoveUnused : public Transform {
return mcs;
}
// removing
LOG3("Removing statement " << getOriginal());
LOG3("Removing statement " << getOriginal() << IndentCtl::indent);
return new IR::EmptyStatement(mcs->srcInfo);
}
return mcs;
Expand Down
12 changes: 12 additions & 0 deletions testdata/p4_16_samples/issue3274-1-FrontEnd_41_SimplifyDefUse.p4
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
void x() {
}
control c() {
apply {
x();
}
}

control _c();
package top(_c _c);
top(c()) main;