Skip to content

[NFC][InstrProf]Refactor readPGOFuncNameStrings #71566

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

Merged
merged 2 commits into from
Nov 9, 2023

Conversation

mingmingl-llvm
Copy link
Contributor

@mingmingl-llvm mingmingl-llvm commented Nov 7, 2023

Refactor this function to take a callback for each decoded string, and change it to a static function in cpp. Move its (sole) caller from header to cpp.

…r each decoded string, and change it to a static function in cpp. Move its (sole) caller from header to cpp

/// This interface is used by reader of CoverageMapping test
/// format.
inline Error create(StringRef D, uint64_t BaseAddr);
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this function missing?

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 think this is an artifact of 'diff' UI.

I swapped the order of two functions(

/// This interface is used by reader of CoverageMapping test
/// format.
inline Error create(StringRef D, uint64_t BaseAddr);
/// \c NameStrings is a string composed of one of more sub-strings
/// encoded in the format described in \c collectPGOFuncNameStrings.
/// This method is a wrapper to \c readPGOFuncNameStrings method.
inline Error create(StringRef NameStrings);
) primarily because, the second create no longer has an 'inline' keyword (since its definition is moved to cpp files).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ninja check-llvm pass (without compiler errors).

@mingmingl-llvm mingmingl-llvm merged commit bb642f8 into llvm:main Nov 9, 2023
@mingmingl-llvm mingmingl-llvm deleted the symtab branch November 9, 2023 18:47
zahiraam pushed a commit to zahiraam/llvm-project that referenced this pull request Nov 20, 2023
Refactor this function to take a callback for each decoded string, rename it and change it to a static function in cpp. Move its (sole) caller definition from header to cpp.
- This is a split of patch llvm#66825; to minimize the diff created in a big PR.
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