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

ProgramMemory: avoid several unnecessary copies #5943

Merged
merged 6 commits into from
Feb 4, 2024
Merged

Conversation

firewave
Copy link
Collaborator

@firewave firewave commented Feb 4, 2024

No description provided.

@firewave
Copy link
Collaborator Author

firewave commented Feb 4, 2024

These were found by manual profiling and review.

I accidentally deleted the output files but I think this saved about 3% of Ir. If desired I can produce them again.

@@ -1270,9 +1270,10 @@ namespace {
ValueFlow::Value r = state.execute(tok);
if (r.isUninitValue())
continue;
result.insert(std::make_pair(tok->exprId(), r));
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I filed llvm/llvm-project#79213 about detecting the unnecessary temporary object.

Copy link
Owner

@danmar danmar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@firewave firewave merged commit db3ce5e into danmar:main Feb 4, 2024
64 checks passed
@firewave firewave deleted the pm branch February 4, 2024 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants