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

[CodeGen] Split off PseudoSourceValueManager into separate header (NFC) #73327

Merged
merged 2 commits into from
Dec 4, 2023

Conversation

nikic
Copy link
Contributor

@nikic nikic commented Nov 24, 2023

Most users of PseudoSourceValue.h only need PseudoSourceValue, not the PseudoSourceValueManager. However, this header pulls in some very expensive dependencies like ValueMap.h, which is only used for the manager.

Split off the manager into a separate header and include it only where used.

@nikic nikic requested review from arsenm and RKSimon November 24, 2023 13:46
Copy link

github-actions bot commented Nov 24, 2023

✅ With the latest revision this PR passed the C/C++ code formatter.

@@ -11,6 +11,7 @@
//===----------------------------------------------------------------------===//

#include "llvm/CodeGen/PseudoSourceValue.h"
#include "llvm/CodeGen/PseudoSourceValueManager.h"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Fix clang-format warning (include order)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I wasn't sure about this one. We usually place the header corresponding to the source file first in the include list, and in this case that's two different headers, not just one.

@nikic
Copy link
Contributor Author

nikic commented Dec 1, 2023

ping

Copy link
Collaborator

@RKSimon RKSimon left a comment

Choose a reason for hiding this comment

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

LGTM

Most users of PseudoSourceValue.h only need PseudoSourceValue,
not the PseudoSourceValueManager. However, this header pulls in
some very expensive dependenceis like ValueMap.h, which is only
used for the manager.

Split off the manager into a separate header and include it only
where used.
@nikic nikic merged commit ea66814 into llvm:main Dec 4, 2023
3 checks passed
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.

None yet

2 participants