This patch adds the missing functionality in parsable text format support for value profiling.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
Sorry for the latency, comments inline --
| lib/ProfileData/InstrProfReader.cpp | ||
|---|---|---|
| 107 ↗ | (On Diff #41810) | I'd prefer to keep format changes for separate NFC commits. |
| 127 ↗ | (On Diff #41810) | This looks correct but a bit repetitive. What do you think of using a macro like: #define AdvanceAndReadInt(Line, Dst) \
if ((Line).is_at_end()) \
return error(instrprof_error::truncated); \
if (((Line)++)->getAsInteger(10, (Dst)))
return error(instrprof_error::truncated); \You could move the various "uint32_t" definitions up, or define them within the macro. |
| 211 ↗ | (On Diff #41810) | This could use a comment like "// Check if we have value profile data, and if so, read it.". |
| test/tools/llvm-profdata/Inputs/vp-malform.proftext | ||
| 5 ↗ | (On Diff #41810) | I don't think these input files should have RUN lines. |
| 43 ↗ | (On Diff #41810) | It's not obvious that this is the error. Please add notes to your tests which make it clear what's being tested. |
| 48 ↗ | (On Diff #41810) | Ditto for CHECK lines. |
| test/tools/llvm-profdata/Inputs/vp-malform2.proftext | ||
| 5 ↗ | (On Diff #41810) | Same comments from the last file. Could you trim this file down a bit? It seems very similar to the last one. |
| test/tools/llvm-profdata/Inputs/vp-truncate.proftext | ||
| 5 ↗ | (On Diff #41810) | Same note about the RUN lines. |